Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
util:jsexec [2010/03/18 01:18] – digitalman | util:jsexec [2018/03/01 12:11] – Links to util:binkit changed to module:binkit digital man | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== JSexec ====== | ====== JSexec ====== | ||
- | JSexec may be used to execute some Synchronet JavaScript files (e.g. '' | + | JSexec may be used to execute some Synchronet JavaScript files (e.g. '' |
- | :!: Note: a Synchronet installation is required, though JSexec will execute scripts successfully even when Synchronet is not running. | + | ===== Uses ===== |
+ | * Persistent execution of static services (e.g. [[:service:ircd]]) independent of Synchronet | ||
+ | * Background execution of timed events (e.g. [[: | ||
+ | * Command-line execution of sysop functions (e.g. [[: | ||
+ | * [[:howto:apache|CGI]] generated dynamic HTML | ||
+ | |||
+ | ===== Independence ===== | ||
+ | |||
+ | A Synchronet installation is required | ||
===== Command Line ===== | ===== Command Line ===== | ||
Line 37: | Line 45: | ||
</ | </ | ||
+ | ==== Module ==== | ||
+ | The '' | ||
+ | |||
+ | **Note:** | ||
+ | When JSexec starts up, it changes its **current working directory** to the Synchronet '' | ||
===== Additional Properties ===== | ===== Additional Properties ===== | ||
Additional properties available to JavaScript scripts running from JSexec: | Additional properties available to JavaScript scripts running from JSexec: | ||
- | ^Property | + | ^Property |
|'' | |'' | ||
|'' | |'' | ||
- | |'' | + | |'' |
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | ===== Additional Functions ===== | ||
+ | |||
+ | The following global methods (functions) are also available to JavaScript scripts running from JSexec: | ||
+ | |||
+ | ^Function | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
===== conio ===== | ===== conio ===== | ||
JSexec includes an instance of a special Console Input/ | JSexec includes an instance of a special Console Input/ | ||
Line 55: | Line 88: | ||
FIXME | FIXME | ||
+ | |||
+ | ===== shebang ===== | ||
+ | |||
+ | JSexec for non-Windows platforms will ignore the first line of the interpreted script if it begins with ''# | ||
+ | < | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | This allows JSexec scripts to be executed easily via [[: | ||
===== See Also ===== | ===== See Also ===== | ||
- | * [[:custom:js|JavaScript]] | + | * [[custom:javascript|JavaScript]] |
* [[: | * [[: | ||
- | * [[:util:|Utilities]] | + | * [[module:binkit|Utilities]] |
{{tag> | {{tag> |