pq_cao 发表于 2007-11-14 15:58:33

如何N次执行录制脚本?

小弟,初识robot,对一些脚本不太熟悉,请哪位朋友指点!谢谢

录制脚本如下:
Sub Main
    Dim Result As Integer

    'Initially Recorded: 2007-11-1415:10:55
    'Script Name: login
   
    Window SetContext, "Caption=ExReport-", ""
    EditBox Click, "Label=姓    名:", "Coords=29,7"
    InputKeys "你好"
    ComboBox Click, "ObjectIndex=2", "Coords=17,7"
         
    Window SetContext, "Caption=ExReport-", ""
    RadioButton Click, "Text=男"
    EditBox Click, "Label=年    龄:", "Coords=21,14"
    ComboBox Click, "Label=检查部位:", "Coords=157,13"
    PushButton Click, "Text=新增患者S"
               
End Sub

怎样可以执行完N次回放后,再弹出查看执行结果窗口?

5am 发表于 2007-11-14 17:20:24

Sub Main
    Dim Result As Integer

    'Initially Recorded: 2007-11-1415:10:55
    'Script Name: login

ForResult = 0 to N-1

    Window SetContext, "Caption=ExReport-", ""
    EditBox Click, "Label=姓    名:", "Coords=29,7"
    InputKeys "你好" & Result
    ComboBox Click, "ObjectIndex=2", "Coords=17,7"
         
    Window SetContext, "Caption=ExReport-", ""
    RadioButton Click, "Text=男"
    EditBox Click, "Label=年    龄:", "Coords=21,14"
    ComboBox Click, "Label=检查部位:", "Coords=157,13"
    PushButton Click, "Text=新增患者S"

Next Result
               
End Sub

N换成你那个N次

pq_cao 发表于 2007-11-14 18:07:48

谢谢5am!~:victory:

lzq1378 发表于 2007-12-29 10:06:07

hao tie
页: [1]
查看完整版本: 如何N次执行录制脚本?