SCRIPTONIT documentation   © 2021, Denes Kellner

We omit the Scriptonit object itself from the calls below; usually it's sci so the final calls will be like or sci.exeArguments(). The base interface is the only one without a group prefix.

    Base interface

    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 app folder
    workingPath() Returns the path where your exe was started from (in php, it's getcwd())
    exeArguments() Returns all command-line arguments as one multiline string
    normalTime() Returns current (or a given) date/time in 1999-11-12 22:33:44 format
    isoTime() Returns date/time as an ISO string, like 1999-11-12T22:33:44.987Z
    jsTime() Returns the long textual representation of date/time, like Wed Jun 30 2021 13:40:48 GMT+0200 (Central Europe Daylight Time)

    Shell interface

    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.capture; returns whether it stopped
    shell.stopped Checks if the last capture command has stopped (or finished)

    Window interface

    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.setLeft Sets the left coordinate of the window (distance from left screen edge in pixels)
    window.setTop Sets the top coordinate of the window (distance from top screen edge in pixels)
    window.getLeft Returns the left coordinate of the window; opposite of setLeft, obviously
    window.getTop Returns the top coordinate
    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 Sizable, None, and a few others.

    File interface

    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 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

    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.