WinScanScript
See:
WinScanScript Help
script
contents
script
script b
script d
A self brew script language to control WinScan.
Quick Start:
Start WinScan, change the
Settings, and exit WinScan.
write a script file like:
StartCooling
WaitUntilTimeReached 20:35:20.1
TakeDriftScanImage
StopCooling
end
Save it at c:\winscan\command\takeimage.txt
Start WinScan with parameters like:
c:\winscan\winscan.exe LoadCommandFile takeimage.txt
WinScan is started with the same settings.
The script file is processed:
StartCooling // starts the cooling
WaitUntilTimeReached 20:35:20.1 // waits until that time is reached
TakeDriftScanImage // takes a drift scan image
StopCooling // shuts off the cooler
If you want to check a script file, open the
Interpreter Form "View Command File Interpreter"
You load a script file or write a new file, change a
file and save it
To check a file press "Update / Reset Interpreter "
Then press "parse next command"
You can do that also without a camera
After pressing that key, at the right a syntax tree is viewed.
At the bottom the processed commands are shown.
The next line in the script file is marked
At the bottom at the right messages can be shown
Behind the syntax tree is a ListBox with error messages
It can be shown by "ShowErrors"
After making changes to the script file press
"Update / Reset Interpreter " again
Also press that key if you want to start with line 0
You can check some sample files by
"Load command file "
Pressing "Run Command File" will run
the whole command file.
Press "Save" to save the file.
Checking a line using the Syntax Tree:
After pressing "parse next command"
There are viewed some nodes
Functions are indicated with (f) (f1)...
Variables with (var) , labels with (l) .
Values have are not indicated
The results of the functions can be shown by checking
"Show Results"
example:
var a = GetTimeNow
the should look like:
line0
(var)var
a
=
(f) GetTimeNow
a is assigned the time
if you typed:
var a = gettimenow
you will get:
line0
(var)var
a
=
gettimenow
the (f) is missing, so you know that gettimenow is no function but a string
Checking "ShowResults" shows the results of functions,
that makes it easier to find such errors
WinScanScript needs/allows no ( ) , ; simply separate all
expressions by spaces
Strings can be stated like: a_string , if they include spaces state like:
"a string".
Strings must be different to reserved words, variables,
even if they are in "" .
The syntax is:
Function parameter parameter ...
parameter can be a function or a variable or a value/string .
Functions may need 0 , 1 or more parameter
To calculate a = ((5 * 3) + sin(7)) type:
var a
a = add mul 5 3 sin 7
or :
a = + * 5 3 sin 7
This is prefix notation or polish notation
if you prefer infix notation, it can be translated:
var a
inf1
a = ( ( 5 * 3 ) + sin 7 )
For some details see:
command_help.txt