Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
129 views

Código Java Datamine

This document contains Java code for a Datamine script. The code includes functions for initializing the Datamine application object, connecting to an active Datamine project, executing script commands, and opening the Datamine help documentation. Standard initialization connects to the active Datamine session and project. Buttons are included to execute script commands or open help documentation.

Uploaded by

junior
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views

Código Java Datamine

This document contains Java code for a Datamine script. The code includes functions for initializing the Datamine application object, connecting to an active Datamine project, executing script commands, and opening the Datamine help documentation. Standard initialization connects to the active Datamine session and project. Buttons are included to execute script commands or open help documentation.

Uploaded by

junior
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Código Java Datamine

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"


"http://www.w3.org/TR/html4/strict.dtd">

<HTML>

<HEAD>

<META Name="DatamineScript" Content="Version3" />

<TITLE>Command Automatically recorded html script.</TITLE>

<SCRIPT TYPE="text/javascript">

// ----------------------------------------------------------------------

// Standard initialisation for Datamine Studio 3

//

var oDmApp= null;

var oScript = null;

function AutoConnect()

try {

oScript = new ActiveXObject("StudioCommon.ScriptHelper");

oScript.initialize(window);

oDmApp = oScript.getApplication();

if (oDmApp == null || oDmApp.ActiveProject == null) //Attempt to Use the Active Datamine


Session

alert("There are no active projects open.\n Please open a project before continuing.");

window.close(); // Closes the script window

return false;

else
{

document.getElementById("logo").src = oDmApp.Options.HtmlFolder +
"\\images\\CAE_Mining_Full_Color.gif";

return true;

catch(e) {

alert("Failed\nReason: " + e.description);

if ( oDmApp) oDmApp.Quit(); // release the session to close it down

return false;

function btnExecute_onclick()

try {

catch(e) {

alert("Failed\nReason: " + e.description);

function btnHelp_onclick()

var features =
"status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes";

var common = "_blank"


var installpath = oDmApp.Options.HelpFolder;

installpath = installpath.replace(" ", "%20");

var helpcommand = "mk:@MSITStore:" + installpath +


"/DatamineStudio.chm::/Studio_3_General/Concept_Studio%203%20Scripting%20Overview.htm";

window.open(helpcommand, common, features);

</SCRIPT>

</HEAD>

<BODY onload="AutoConnect();" onunload="oDmApp = null;oScript = null;">

<div>

<table border="0" cellpadding="5" cellspacing="0">

<tr>

<td><b>Script_2</b>

</td>

<td><img src="C:/Program Files/Datamine/StudioOP//html/images/CAE_Mining_Full_Color.gif"


id="logo" alt="CAE Mining" width="100" height="39" /></td>

</tr>

<tr>

<td align="center" colspan="2"></td>

</tr>

<tr>

<td align="center" colspan="2">

<input type="button" value="Execute" name="btnExecute" onclick="return btnExecute_onclick()"


style="width: 75px" />

<input type="button" value="Help" name="btnHelp" onclick="return btnHelp_onclick()"


style="width: 75px" />

</td>

</tr>

</table>

</div>
</BODY>

</HTML>

You might also like