QTP拖動對象的腳本

發表于:2008-09-04來源:作者:點擊數: 標簽:qtpQTP腳本拖動對象
Set shell = CreateObject("Wscrīpt.Shell") shell.Run "C:\ WINDOWS \system32\calc.exe" Window("regexpwndtitle:=計算器").Activate Dim x_source , y_source Dim x_goal , y_goal Dim Device 'DeviceReplay對象 x_source = Window("regexpwndtitle:=計


Set shell = CreateObject("Wscrīpt.Shell")
shell.Run "C:\WINDOWS\system32\calc.exe"

Window("regexpwndtitle:=計算器").Activate

Dim x_source , y_source
Dim x_goal , y_goal
Dim Device  'DeviceReplay對象

x_source = Window("regexpwndtitle:=計算器").GetROProperty("abs_x") + 50
y_source = Window("regexpwndtitle:=計算器").GetROProperty("abs_y") + 10

x_goal = x_source +100
y_goal = y_source + 100

Set Device = createobject("Mercury.DeviceReplay")

Device.DragAndDrop x_source , y_source , x_goal , y_goal , LEFT_MOUSE_BUTTON

set shell = Nothing
set Device = Nothing


 

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97