// TeXworksScript
// Title: Re-load Globals
// Description: Re-loads gloabal varibales used in script modules
// Author: Paul A Norman
// Version: 0.3
// Date: 2010-12-19
// Script-Type: standalone
// Context: TeXDocument
// Shortcut: Alt+R, Alt+L
// TW.information(null,"Hello","Hello from Module Re-Load");
function setUp(globalName, fileName)
{
var fileResult = TW.readFile(fileName);
TW.app.setGlobal(globalName, fileResult.result); // makes it available for later eval() in other scripts
}
setUp("helper_twPan", "helper_twPan.mod");// later eval() of this will create:
// twConst, msgBox, twPan, global_load(globalName), create_helper()
setUp("phpjs_namespaced", "phpjs.namespaced.mod"); // later eval() of this will create:
// PHP_JS(); object factory function
setUp("helper_PhpJs",'helper_PhpJs.mod'); // later eval() of this will create:
// an object called window and PhpJs from new PHP_JS();
Created with the Personal Edition of HelpNDoc: Full featured Help generator