|
dim flag
flag =1
If flag = 1 Then
Dialog("Login").WinEdit("Agent Name:").Set DataTable("p_Text1", dtGlobalSheet)
Dialog("Login").WinEdit("Agent Name:").Type micTab
Dialog("Login").WinEdit("Password:").SetSecure DataTable("p_Text", dtGlobalSheet)
Dialog("Login").WinEdit("Password:").Type micReturn
Window("Flight Reservation").WinObject("Date of Flight:").Type "062807"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Paris"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Frankfurt"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "12990 PAR 08:09 AM FRA 10:04 AM AA $225.80"
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Type "JOJO"
Window("Flight Reservation").WinEdit("Name:").Set "JOJO"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set DataTable("p_Text2", dtGlobalSheet)
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
Window("Flight Reservation").WinButton("Delete Order").Click
Window("Flight Reservation").Dialog("Flight Reservations").WinButton("是(Y)").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
flag = flag -1
msgbox flag
else
msgbox "1111111"
End If
'flag = flag -1
'msgbox flag
'else
我参数化了一下用户名和密码,没有加ELSE的时候,脚本会自动卡在GLOBAL表中的第2行,但为什么加了ELSE语句就可以达到循环的作用 |
|