脚本开发-定义全局变量 by:授客 QQ:1033553122 如果参数是全局的,在脚本中的任何一个Action中都可以使用,变量一般是局部的,如果跨Action调用会出现未声明的错误。 打开Script视图中左侧Action列表中的globals.h文件,可定义全局变量
打开globals.h脚本,在globals.h中的//Global Varaiables后设置全局变量,这里设置的变量可以在不同的Action中用 eg: #ifndef _GLOBALS_H #define _GLOBALS_H //-------------------------------------------------------------------- // Include Files #include "lrun.h" #include "web_api.h" #include "lrw_custom_body.h" //-------------------------------------------------------------------- // Global Variables int i; //在这里添加我们的全局变量 #endif // _GLOBALS_H |
|