The modularization: LoadScript()

Window.LoadScript(filename):

You can replace the current script code.

Here's an example:
// File: loadscript.w_js (JScript)

Window.width = 40 * Window.cxChar;
Window.height = 8 * Window.cyChar;

Window.AppendMenu(0,"MF_STRING",8000,"Next Script");
Window.DrawMenuBar();

function WM_COMMAND(id)
{
 if (id == 8000) Window.LoadScript("timer.w_js");
}
'VBScript
Window.width = 40 * Window.cxChar
Window.height = 8 * Window.cyChar

Window.AppendMenu 0,"MF_STRING",8000,"Next Script"
Window.DrawMenuBar

Function WM_COMMAND(id)
 If (id = 8000) Then
     Window.LoadScript("timer.w_js")
 End If
End Function
Notes:
  1. The current menu shall delete.
  2. The controls layer and graphics layer shall not delete.
content
The new scripting host. It is not wscript.exe!
JScript and VBScript are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.