 |
Zeus Use this forum to ask for help, submit a bug report or make a suggestion.
|
| View previous topic :: View next topic |
| Author |
Message |
jussij Site Admin
Joined: 13 Aug 2004 Posts: 1938
|
Posted: Thu Sep 22, 2005 5:51 am Post subject: Writing Zeus Macros Using Digital Mars Scripting |
|
|
Since the Digital Mars Scripting implements the Windows Scripting Host interface, this means it is also possible to write Zeus macros using the DMD Scripting language.
To setup Zeus for DMDScript scripting do the following:- Make sure you are running the latest version of Zeus
- Download the DMDScript component
- Register the DMDScript WSH using regsvr32 dscript.dll
- Go to the Zeus install directory and edit the scriptwsh.dat file making these changes:
| Code: | [Options]
Language=DMDScript
Extension=ds
MacroBegin=function key_macro()\n{
MacroEnd=}\n\nkey_macro() // run the macro
FunctionPrint=\tzeus.write("%s")
FunctionPrefix=zeus.
FunctionPostfix=;
Enter=\n
CRLF=\\n
LineFeed=\r
Tick='
Quote="" |
Close, then restart Zeus
Save this test macro to the zScript\test.ds location
| Code: | function key_macro()
{
zeus.screen_update_disable();
zeus.FileNew();
zeus.write("ScriptEngine: " + ScriptEngine() + "\n" +
"Build: " + ScriptEngineBuildVersion() + "\n\n");
zeus.write("This is a Digital Mars macro script........\n")
zeus.screen_update_enable();
zeus.screen_update();
}
key_macro() // run the macro |
To run the test macro use Macros, Execute Script menu and type in test.ds
If all goes to plan the macro will create a new document window and the line of text will be added to the document.
Cheers Jussi |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|