S0 scripting language
Encyclopedia : S : S0 : S0S : S0 scripting language
S0 is an esoteric programming language. It is similar to the scripting language AutoIt. It was designed as an aide to users of Windows to make some tasks (like logins or the monitoring of processes) easier. This design goal was thwarted by poor forethought, making S0 a difficult language in which to code.
Syntax
Syntax comprises of three-character keywords that attempt to be mnemonic. These keywords control program mode, program flow, input, output, memory usage and so on.Purpose
S0 is a very flexible language, but by far the easiest things to do are simple starting / ending of processes and input / output of text. Mathematics is difficult to impliment in S0, nevertheless, S0 is Turing-Complete.S0 allows for:
- extensive file IO
- input and output with IO streams
- access to the windows clipboard
- access to system date and time
- ASCII conversions
- a stack
- access to processes (start, terminate and push to stack)
- Send Keys functionality (sends keystrokes to the active window)
- subroutines (infinitely nestable)
- a fixed number of flags and counters
- Two multi-mode memory registers
- scripts to be run within other scripts
- the current script to be replaced by fresh instructions read from file in mid execution
- Literals file interpretation (a Literals file is a sort of #define file)
- a Dynamic Script Element (allows the interpreter to reinterpret the script at runtime to replace flags with values)
- more
Examples
This program prompts the user to enter a number, an operator and another number, before starting the Windows® calculator and sending the sum to be performed as a series of keystrokes. The calculator is left open with the result of the keystrokes displayed.
BEG IMS 2 // Set input mode to 'console' . OBS false // Don't output line breaks automatically. AMS 1 // Append to memory. LIS Type a number: AAS LIS Type a number: OMS 3 PSS calc // Start calculator PAU 1000 // Pause to allow it to be completely initialised. OMS 3 // Set output mode to 'send keys' SAY // Output ENT // 'Press' enter on calculator. OMS 1 // Set output back to console to avoid outputting stray keys. END
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
