为什么right函数后未空值
qtp自动的登录系统,录制订单的一部分,为什么我right后值为空?DimTcounts,Fcounts
Window("Flight Reservation").WinObject("Date of Flight:").Type "121214"
Tcounts=Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("items count")
Fcounts=Window("Flight Reservation").WinComboBox("Fly To:").GetROProperty("items count")
Window("Flight Reservation").WinComboBox("Fly From:").SelectRandomNumber(0,Fcounts-1)
Window("Flight Reservation").WinComboBox("Fly To:").Select RandomNumber(0,Tcounts-1)
Lcounts=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetROProperty("items count")
Window("Flight Reservation").Dialog("Flights Table").WinList("From").SelectRandomNumber(0,Lcounts-1)
selectcons=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetSelection
'msgbox selectcons
selectcons=replace(selectcons," ","")
price=right (selectcons, 7)
msgbox selectcons
msgbox flighno
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click 懒的克,msgbox selectcons
打印出来的结果是什么,直接发上来 如图所示 回复 2# 黑羽祭 如图所示 本帖最后由 黑羽祭 于 2012-12-17 09:12 编辑
回复 4# 小丫头amy
你确定你right后是空的么?
price=right (selectcons, 7)
msgbox selectcons
msgbox flighno
会不会是你变量写错了?right后值给了price,但你打印的是selectcons和flighno,并没有打印price啊
页:
[1]