kart442 0 Posted October 23, 2007 I can get it to move one time only, need it to move for each step.Thanks for your help.CODESleep(5000)WinMove("inputter.bmp - Paint", " ", 363, 108)Local $red = 0xFF0000Local $green = 0x00FF00Sleep(1000)For $y = 686 To 245 Step - 63 For $x = 677 To 1118 Step 63 If PixelGetColor($x, $y) = $red Then If Not @error Then MsgBox(0, "RED", $x & "," & $y) WinMove("inputter.bmp - Paint", " ", 363, 108) ; How do I get this window to move "x" - 63 from current position and for "y" to stay the same for each step of "$y" EndIf EndIf If PixelGetColor($x, $y) = $green Then If Not @error Then MsgBox(0, "GREEN", $x & "," & $y) EndIf EndIf Next Next Share this post Link to post Share on other sites
mik 0 Posted October 23, 2007 (edited) That's because the window has been in the positon(363,108). In fact, it has moved but you can see the movement. refer to this method: Opt("WinTitleMatchMode",2) Dim $title="Untitled" if WinExists($title) Then WinActivate($title) EndIf $size=WinGetPos($title) MsgBox(0, "Active window stats (x,y,width,height):", $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3]) WinMove($title, "", 0,0,300, 300) Do $x=WinGetPos($title) ;MsgBox(0,'x:',$x[0]) WinMove($title,"",$x[0]+20,$x[1],$x[2]+20,$x[3]) Sleep(1000) Until $x[0]>=100 Do $y=WinGetPos($title) WinMove($title,"",$y[0],$y[1]+20,$y[2],$y[3]+20) Sleep(1000) Until $y[1]>=100 $size=WinGetPos($title) MsgBox(0, "Active window stats (x,y,width,height):", $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3]) Important Notes: before run this script, please new a txt file, and don't name it! Edited October 23, 2007 by mik Share this post Link to post Share on other sites
mik 0 Posted October 23, 2007 In fact, you will get more information about most methods in the help files. Share this post Link to post Share on other sites