Home
Auto Debug On Line Help
 
User Script: Auto Debug System

addMenuItem

The addMenuItem function to add a menuitem to Auto Debug System, user can click the menu to call script function.

void addMenuItem(
  BSTR szDescript,    // Menu descript
  BSTR szFunction     // Menu function
);

Parameters

szDescript
Menu descript to display on menu item.
szFunction
When user click the menu item, system will call the Menu function which had be defined in script.

Return Values

No return value.

Examples

VBscript Example:

sub main
  addMenuItem "Save Log", "SaveLogFile"
  addMenuItem "Kill Trace Process", "KillTraceProcess"
  startProcess "Notepad.exe", "c:\a.txt"
end sub

sub SaveLogFile
    MsgBox "Call Save Log File"
    saveLog "c:\aaa.dsf"
end sub

sub KillTraceProcess
    MsgBox "Call Kill Process"
    killProcess false
end sub

JavaScript Example:

function main(){
  addMenuItem("Save Log", "SaveLogFile");
  addMenuItem("Kill Trace Process", "KillTraceProcess");

  startProcess("Notepad.exe", "c:\a.txt");
}

function SaveLogFile(){
    echo("Call Save Log File");
    saveLog("c:\aaa.dsf");
}

function KillTraceProcess(){
    echo("Call Kill Process");
    killProcess(false);
}

Requirements

Auto Debug for Windows: Unsupport.
Auto Debug Professional: Requires version 5.0 or later.

See Also

Script Information Overview, Script Functions, startProcess,killProcess ,saveLog

Copyright c 2003-2017, www.autodebug.com All Rights Reserved