![]() |
Call us at +1 586 62 ELLIE
|
|
User macro-commands
In Ellié Computing Merge, we decided to integrate a full ECMAScript engine to let you make your own macro-commands. Defining macrosThe "User" macro commands are ECMAScript functions. These functions are listed in the "macros" global Array object. Thus, adding a function to this array makes it available as a macro command in the Edit / Macros menu (it appears after next Reload macro files, Alt-F11 by default). In order to make this possible, Ellié Computing Merge loads and execute macro scripts at start-up (and also at Reload macro files time). When a macro script is executed, it simply declares some macro as available in this way:
macros["macro_name"] = function ( ) {
// body of the macro
alert ("I was executed at " + Date());
}
macros["macro_name"].label = "Beautiful Macro name";
macros["macro_name"].shortcut = "Ctrl+Shift+0";
macros["macro_name"].toolbar_name = "My macros";
macros["macro_name"].toolbar_rank = 1;
macros["macro_name"].icon_url = script_url.compose("../myicon.png");
You can save the above sample in the 'macros' directory of Ellié Computing Merge as 'sample_macro.js', then execute Reload macro files. The "macro_name" macro appears in the macros menu, executing it will display the famous web-browser alert box with "I was executed at [current date and time]" text inside. Accessing macros from Graphical User InterfaceMacros are accessible from:
|
|||||||||
|
Select your language English Français | ||||||||||