// Root of Script host.diagnostics.debugLog("***>; Code at the very top (root) of the script is always run \n");
functioninitializeScript() { // Add code here that you want to run every time the script is loaded. // We will just send a message to indicate that function was called. host.diagnostics.debugLog("***>; initializeScript was called \n"); }
functioninvokeScript() { // Add code here that you want to run every time the script is executed. // We will just send a message to indicate that function was called. host.diagnostics.debugLog("***>; invokeScript was called \n"); }
functionuninitializeScript() { // Add code here that you want to run every time the script is unloaded. // We will just send a message to indicate that function was called. host.diagnostics.debugLog("***>; uninitialize was called\n"); }
functionmain() { // main is just another function name in JavaScript // main is not called by .scriptload or .scriptrun host.diagnostics.debugLog("***>; main was called \n"); }
基础函数
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
let logln = function (e) { host.diagnostics.debugLog(e + "\n"); }