4,009
社区成员




Dim IntNumber_flyfrom,IntNumber_flytime
Dim Str_flyfrom,Str_flytime
Window("Flight Reservation").Activate
IntNumber_flyfrom=Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount
For i=0 to IntNumber_flyfrom-1
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "040411"
Str_flyfrom=Window("Flight Reservation").WinComboBox("Fly From:").GetItem(i)
Window("Flight Reservation").WinComboBox("Fly From:").Select Str_flyfrom
Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
'是这里要加个if语句么
Window("Flight Reservation").WinButton("FLIGHT").Click
IntNumber_flytime=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount
For k=0 to IntNumber_flytime-1
Str_flytime=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItem(k)
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select Str_flytime
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "qwe"
Window("Flight Reservation").WinRadioButton("First").Set
Window("Flight Reservation").WinEdit("Tickets:").SetSelection 0,1
Window("Flight Reservation").WinEdit("Tickets:").Set "2"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "040411"
Str_flyfrom=Window("Flight Reservation").WinComboBox("Fly From:").GetItem(i)
Window("Flight Reservation").WinComboBox("Fly From:").Select Str_flyfrom
Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
Window("Flight Reservation").WinButton("FLIGHT").Click
Next
Window("Flight Reservation").Dialog("Flights Table").WinButton("Cancel").Click
Next