LabTalk script and the Script WindowThere is some confusion about the Script Window and how it works.
Basically it is a text window that can act as input to the LabTalk
command interpreter. This capability can be turned on and off with
the Edit:Script Execution menu option. When on, and you type a line
of text and then press Enter, the line is interpreted as LabTalk
script. At that point, a semicolon gets appended to the line to
indicate it has been interpreted. If you type the semicolon at the
end of the line and then press Enter, it does not get interpreted.
If you highlight a block of text (including those semicolons) and
press Enter, the whole block is sent to the interpreter. If you
need a script command to spread out over multiple lines, just turn
execution off, type the lines, then turn it back on and do a
highlight&Enter.
Try to think of the Script Window as a handy tool rather than a
full-blown IDE environment.
The LabTalk interpreter has a limited internal buffer that can hold
about 1000 tokens - which means about 1000 characters. This size
limit applies to script between brackets { } or a highlighted block
of script in the Script Window. This can certainly be a 'hassle'
when you get on a coding roll, but has a side benefit of making you
code in manageable blocks.
Interrupting a script depends heavily on what your script is doing.
Sometimes simply pressing the escape key stops a script. Sometimes
you can make a button that executes a BREAK 1 command, and sometimes
you can execute a BREAK 1 command in the Script Window. At other
times there is nothing you can do but wait.
The LabTalk script language is always undergoing improvements
which sometimes produces unintended side effects. Hopefully the
scripts we write now will work correctly with future versions of the
software, but some change is necessary (the switch to object.property
notation led to the prohibition against variable names with periods).
In general, all LabTalk commands that take arguments should have those
arguments separated by a space or a single argument that contains a
space protected with parentheses. As such, your:
getyesno(blabla)variable(window title)
shouldn't work in any version - and in fact doesn't set 'variable'.
However,
getyesno (blabla) variable (window title)
works in all versions.