Dialog("Login").WinEdit("Agent Name:").Set "235235"
Dialog("Login").WinEdit("Password:").SetSecure "537363987f223d61a16ed34951bf79ced1fea3f9"
Dialog("Login").WinButton("OK").Click
Dim i
For i=1 to datatable.GetSheet("Action1").GetRowCount
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type DataTable("date", dtLocalSheet)
Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("from", dtLocalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("to", dtLocalSheet)
Window("Flight Reservation").WinButton("FLIGHT").Click
itemCount=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount
selectitem=RandomNumber(0,itemCount)
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select selectitem
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "1243"
Window("Flight Reservation").WinRadioButton("First").Click
If Window("Flight Reservation").WinButton("Insert Order").GetROProperty("enabled")=true Then
Window("Flight Reservation").WinButton("Insert Order").Click
else
Window("Flight Reservation").WinButton("Delete Order").Click
End If
call Window("Flight Reservation").WinButton("Delete Order").CheckProperty("enabled", true)
datatable.GetSheet("Action1").setnextrow
Next
Window("Flight Reservation").Close