Syntax:
create {file} {name} create {file} using dialog {title} [at {left} {top}] create {process} {name} create {timer} [duration {value} tick[s]/second[s]/minute[s]] create {dispatcher} case {string} {block} [...] [default {block]
Keyword handler:
net.eclecity.linguist.basic.keyword.BasicKCreate.class
Runtime handler(s):
net.eclecity.linguist.basic.handler.BasicHCreate.class
Function:
The first two forms create a new file, removing the previous version if it already exists and making it ready to be written. You can either provide a pathname or request a dialog. If the latter, the system will remember the last directory you visited and return to it next time.
The third form creates and launches a new process using the string given as the command to the operating system. The process can be stopped when desired.
The fourth form creates a timer, giving it the requested duration but not starting it. See on, start and stop.
The final form sets up a dispatcher, which is an efficient mechanism for switching between several string values. Once the dispatcher is set up, using send {string} to {dispatcher} will select the appropriate outcome - see send.
Example(s):
create OutputFile "c:\MyData\mydata.txt" create OutputFile using dialog "Give me a name" at 300 450 create Browser "rundll32 url.dll,FileProtocolHandler http://www.javaworld.com" create ShortDelay duration 40 ticks create Dispatch case "Memory" gosub to ShowMemoryAvailable case "Verbose" invert Verbose default gosub to ShowErrorScreen