OriginPro LabTalk学习笔记2——执行脚本的方法

随笔2周前发布
37 0 0

1. 通过ogs文件

将命令保存为.ogs文件。ogs文件通常包含分区[section]

如下脚本示例:

type -b "HELLO WORLD";

[Section1]
type -a "Hello";

[Section2]
type -a "World";

然后可以脚本窗口中,通过run.file 和 run.section 命令来运行文件。

2. run.file的使用方法

run.file( filename.ogs )

3. run.section的使用方法

run.section( filename.ogs , sectionname )

例如把示例代码保存为Test.ogs文件。

run.file(Test) //or run.file(Test.ogs) 将打开对话框“Hello World”;
run.section(Test, Section1) //or run.section(Test.ogs, Section1) 将打印“Hello”。

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...