Print Globals to HTML
Outputs a snapshot of the whole Global table to an HTML file
Category: Script Writing
Published: Jul 15 2022, 03:30
Last Edited: May 12 2023, 04:49
Created for Moho Version: < 9.5
Returned Version: 3.93
Edition Downloads: 623
HS_Globals – version 3.93
==========================
This script scans the list of global variables used within Moho and creates a list of these and, for variables, their instantaneous values in an html file.
Minor changes from 3.83 (last published version) in the output formatting. Minor code re-structuring for future enhancement.
Installation
=============
Copy the script file to
\scripts\menu\Script Writing
(or any other directory as required)
Requires:
========
HS_formatUserData.lua - this need to be in the utilities folder.
Operation
==========
Navigate to
>> Scripts / Script writing / Print Globals to HTML file
When prompted, enter a valid path and file name. The script will add “.html” as a suffix if not entered.
Press “save”. (Pressing “cancel” abandons the operation.)
If the file already exists confirm that it is OK to overwrite.
When the script has run an information pop-up will be presented giving the full path of the created file. If the operating system supports commands from LUA, there will be two buttons:
>> “Open” will invoke the browser and open the output file. If this operation fails it will do so without issuing any diagnostic, but the output file will still be saved.
>> “OK” to acknowledge the message and exit without opening the file.
If the operating system does not support commands from LUA, only the “OK” button will be presented.
(note that the standard Moho utility is in the same menu list as simply “Print Globals” – this lists the globals on the LUA console).
Known Issues
==============
None.
==========================
This script scans the list of global variables used within Moho and creates a list of these and, for variables, their instantaneous values in an html file.
Minor changes from 3.83 (last published version) in the output formatting. Minor code re-structuring for future enhancement.
Installation
=============
Copy the script file to
\scripts\menu\Script Writing
(or any other directory as required)
Requires:
========
HS_formatUserData.lua - this need to be in the utilities folder.
Operation
==========
Navigate to
>> Scripts / Script writing / Print Globals to HTML file
When prompted, enter a valid path and file name. The script will add “.html” as a suffix if not entered.
Press “save”. (Pressing “cancel” abandons the operation.)
If the file already exists confirm that it is OK to overwrite.
When the script has run an information pop-up will be presented giving the full path of the created file. If the operating system supports commands from LUA, there will be two buttons:
>> “Open” will invoke the browser and open the output file. If this operation fails it will do so without issuing any diagnostic, but the output file will still be saved.
>> “OK” to acknowledge the message and exit without opening the file.
If the operating system does not support commands from LUA, only the “OK” button will be presented.
(note that the standard Moho utility is in the same menu list as simply “Print Globals” – this lists the globals on the LUA console).
Known Issues
==============
None.