Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

创建用户界面对话框

  • Last UpdatedSep 24, 2024
  • 2 minute read

在脚本中,使用以下命令产生用户界面对话框:

dim DlgBody as message;

dim DlgTitle as message;

dim Style as integer;

dim Result as integer;

<1>DlgBody = "Do you want to open the valve </1>’<2>MR-3-FF</2>’<3>?";</3>

DlgTitle = "Confirm Opening Valve MR-3-FF";

Style = 48;

OLE_CreateObject(%WS,"Wscript.Shell");

result = %WS.Popup(DlgBody,1,DlgTitle,Style);

本例创建以下用户界面对话框。

User interface dialog box

Style 标记名确定有哪些图标与按钮出现在对话框上。使用以下值:

图标

样式

(无图标)

无图标

0

Error icon

错误图标

16

Question mark icon

问号图标

32

Warning icon

警告图标

48

Information icon

信息图标

64

要使用特定的按钮,请将以下值之一添加到 Style 值:

样式

0

确定按钮

1

确定取消按钮

2

放弃重试忽略按钮

3

取消按钮

4

按钮

5

重试取消按钮

6

取消重试继续按钮

Result 标记名包含用户选择的按钮编号。这可用作 InTouch 脚本中的条件分支。可能的结果码如下:

结果值

含义

1

按了确定按钮

2

按了取消按钮

3

按了放弃按钮

4

按了重试按钮

5

按了忽略按钮

6

按了按钮

7

按了按钮

10

按了重试按钮

11

按了继续按钮