We omit the Scriptonit object itself from the calls below; usually it's
sci so the final calls will be like
sci.exeArguments(). The base interface is the only one without a group prefix.
Some really simple calls to get information about where you are and when. Later, in future versions, these calls might be outsourced into separate interface classes (almost surely a Location and a Time class will appear, but let's not spoil the surprise); anyway, right now they're here and they're very convenient without a prefix.
|exeFilePath()||Returns the path of your EXE file (without the name); always ends with backslash|
|projectPath()||Returns the path for your
|workingPath()||Returns the path where your exe was started from (in php, it's
|exeArguments()||Returns all command-line arguments as one multiline string|
|normalTime()||Returns current (or a given) date/time in
|isoTime()||Returns date/time as an ISO string, like
|jsTime()||Returns the long textual representation of date/time, like
|shell.shortCommand||Runs DOS command, waits for it to finish, returns output as string – Read more|
|shell.capture||Runs DOS command and starts capturing output; channels it into callback functions – Read more|
|shell.stop||Kills the running process of the last
|shell.stopped||Checks if the last capture command has stopped (or finished)|
These calls only serve one purpose: to deal with the application window itself. They look plenty but they are just glorified move/resize tools. One important example is window.close, this is an exit point for your application. Also, setTitle can come in handy for reporting progress or displaying information on the taskbar while the app is in background.
|window.setTitle||Sets the application window title (together with the taskbar caption)|
|window.minimize||Minimizes the applicaton window|
|window.maximize||Maximizes the applicaton window|
|window.restore||Restores the applicaton window to its normal state|
|window.close||Quits the application|
|window.setPosition||Sets the application window x/y position|
|window.setSize||Sets window width/height together|
|window.setWidth||Sets width individually|
|window.setHeight||Sets height individually|
|window.getWidth||Returns window width|
|window.getHeight||Returns window height|
|window.setBorderStyle||Sets window border, like
For files, you don't really need more than this; a lot can be achieved thru the shell interface. (See the FolderStats demo app.) A next version of Scriptonit will probably be equipped with more direct tools to work with attributes, access rights, copying/moving and so on but since you have standard DOS commands for almost everything (and you can redirect back and forth and filter and only read the final result to a string), it's really quite sufficient.
|file.exists||Checks if a file exists; full path or relative to workingPath is accepted|
|file.load||Loads the whole contents of a file to a variable|
|file.save||Writes a string to a file (fully overwriting it!)|
|file.append||Appends a string to a file (creates the file if it doesn't exist)|
|file.delete||Deletes a file|
|file.drives||Returns the logical drives available (one per row)|
|file.list||Lists all directory entries from a certain path, matching a certain mask – Read more|
|file.listFiles||Same as file.list but only files will be included – Read more|
|file.listDirs||Same as file.list but only directories – Read more|
|file.listDetails||Returns tab-separated rows for every file, with date and size before filename – Read more|
Audio interface is one call only; this is because MCI is an all-purpose language in multimedia, much like SQL, so one function will make you able to do a lot of things. The only problem is how - it's not easy to find a reference for MCI; I tried my best. If you look for MCI resources, you'll end up with lots of useless references from Microsoft, but keep trying - what you need is MCI string interface.
|audio.command||Executes an MCI string. Here are some examples of what it can do for you.|