DonQuan
15 years agoNew Contributor
Script Extensions Runtime Object
Hi experts,
i'm using testcomplete 6.5 and try to create a runtime object which provides me some methods.
i created the description.xml and put this xml together with the script unit in an folder.
in the code completion of testcomplete i can see my runtime object, but when i choose the object it doesnt provide me the methods i included in the xml file.
could somebody help me, why i cant get the methods from my runtime object.
thanks in advance
Quan
my description.xml :
<?xml version="1.0" encoding="UTF-8"?>
<ScriptExtensionGroup Name = "My Extensions">
<ScriptExtension Name = "WindowsCommands" Author = "Chi Quan Hong" Version = "1.0 test" HomePage = "www.automatedqa.com">
<Script Name = "WindowsCommands.js">
<RuntimeObject Name = "WindowsCommand">
<Method Name = "GMatrix_CallCommand" Routine = "GMatrix_CallCommand">
</Method>
<Description>
Set CheckBox.
</Description>
</RuntimeObject>
</Script>
<Description>Provides scripting interface to custom windows commands function.</Description>
</ScriptExtension>
</ScriptExtensionGroup>
my jscript unit WindowsCommands.js:
/*
* Window Messages
*/
var WM_COMMAND = 0x0111;
/*
* Button Control Messages
*/
var BM_GETCHECK = 0x00F0;
var BM_SETCHECK = 0x00F1;
var BST_UNCHECKED = 0x0000;
var BST_CHECKED = 0x0001;
var BST_INDETERMINATE = 0x0002;
var BST_PUSHED = 0x0004;
var BST_FOCUS = 0x0008;
function Btn_SetCheck( hWndBtn, nCheck )
{
Win32API.SendMessage(hWndBtn,BM_SETCHECK,nCheck,0 );
}
function Btn_GetCheck( hWndBtn )
{
return Win32API.SendMessage(hWndBtn,BM_GETCHECK,0,0 );
}
function GMatrix_CallCommand( nCmdID )
{
var hWnd = NameMapping.System.GMatrix.w_MainFrame.Handle;
Win32API.PostMessage( hWnd,WM_COMMAND, nCmdID, 0 );
}