...
有四个命令专门与脚本相关。事实上,这些命令对于任何其他目的都毫无用处。此外,THCAD®具有用于记录脚本的RECSCRIPT命令,如本章前面所述。
四个基本命令是:
SCRIPTThe SCRIPT command performs double-duty: (1) it loads a script file and (2) immediately begins running it.Note: Remember to turn off (set to 0) the FILEDIA system variable so that the prompts appear at the Command line, instead of the dialog box.
RSCRIPTShort for "repeat script", this command reruns whatever script is currently loaded inTHCAD®. A great way to create infinite loops.
RESUMEThis command resumes a paused script file. Pause a script file by pressing the Backspace key.
DELAYTo create a pause in a script file without human intervention, use the DELAY command along with a number. The number specifies the pause in milliseconds, where 1,000 milliseconds equal one second.Note: The minimum delay is 1 millisecond. The maximum is 32767 milliseconds, which is just under 33 seconds.The DELAY command is used in a script file to wait while a slide file is displayed or to slow down the script file enough for humans to watch the process.
SPECIAL CHARACTERS
...
脚本
SCRIPT 命令执行双重任务:(1) 它加载一个脚本文件,(2) 立即开始运行它。注意:请记住关闭(设置为 0)FILEDIA 系统变量,以便提示显示在命令行中,而不是对话框中。
RSCRIPT的
“repeat script”的缩写,此命令重新运行当前加载在BricsCAD®中的任何脚本。创建无限循环的好方法。
恢复
此命令恢复暂停的脚本文件。按 Backspace 键暂停脚本文件。
延迟
要在没有人工干预的情况下在脚本文件中创建暂停,请使用 DELAY 命令和数字。该数字指定暂停时间(以毫秒为单位),其中 1,000 毫秒等于 1 秒。注意:最小延迟为 1 毫秒。最大值为 32767 毫秒,略低于 33 秒。DELAY 命令在脚本文件中用于等待显示幻灯片文件或将脚本文件放慢到足以让人类观看该过程的速度。
特殊字符
除了特定于脚本的命令外,还有一些特殊字符和键。
输入 -- (空格)最重要的特殊字符是不可见的。空格和回车符(或行尾)都等效于按空格键或 Enter 键时的回车符。事实上,两者是可以互换的。但棘手的部分是它们是看不见的。有时,编写脚本需要大量空格,因为该命令需要连续按几次 Enter 键。ATTEDIT 命令就是一个很好的例子:; Edit the attributes one at a time: attedit 1,2attedit 和坐标 1,2 之间有多少个空格?因此,最好每行放置一个脚本项,如下所示:; Edit the attributes one at a time: attedit 1,2现在更容易计算四个空格,因为每行有一个空格。
...