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/01/10 02:31] – Add additional Properties (stdio) and Functions 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 36: | Line 44: | ||
-! wait for keypress (pause) on error | -! wait for keypress (pause) on error | ||
</ | </ | ||
+ | |||
+ | ==== Module ==== | ||
+ | The '' | ||
===== Additional Properties ===== | ===== Additional Properties ===== | ||
Line 41: | Line 52: | ||
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 86: | ||
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]] |
* [[: | * [[: | ||
* [[: | * [[: | ||
{{tag> | {{tag> |