2dkot Posted November 11, 2008 Share Posted November 11, 2008 Guys, please, I need your advise Script doesn't work and I think that it is something wrong with this array: WinWaitActive('Письмо от юридического лица "ин: СК под: 101-9 №: 40 г: 8 05.11.2008"',"", 1) $size = WinGetPos('Письмо от юридического лица "ин: СК под: 101-9 №: 40 г: 8 05.11.2008"', "") If $size[0]>290 Then mousemove ($size[0]+1,$size[1]+1) mouseclick("left") I got Error: Subscript used with non-Array variable. I want just to drag some window to the correct position. Thanks for any comment Link to comment Share on other sites More sharing options...
Josbe Posted November 11, 2008 Share Posted November 11, 2008 (edited) Guys, please, I need your advise Script doesn't work and I think that it is something wrong with this array: WinWaitActive('Письмо от юридического лица "ин: СК под: 101-9 №: 40 г: 8 05.11.2008"',"", 1) $size = WinGetPos('Письмо от юридического лица "ин: СК под: 101-9 №: 40 г: 8 05.11.2008"', "") If $size[0]>290 Then mousemove ($size[0]+1,$size[1]+1) mouseclick("left") I got Error: Subscript used with non-Array variable. I want just to drag some window to the correct position. Thanks for any commentYou got this error, because the window possibly doesn't exists. Then, returned value($size) isn't an Array. If your window exists, check if the name of the title requested it's correct. $sTitle= "Title" WinWaitActive($sTitle,"", 1) If WinExists( $sTitle ) Then $size = WinGetPos($sTitle, "") If $size[0]>290 Then mousemove ($size[0]+1,$size[1]+1) mouseclick("left") Endif EndIf Edited November 11, 2008 by Josbe AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
2dkot Posted November 12, 2008 Author Share Posted November 12, 2008 You got this error, because the window possibly doesn't exists. Then, returned value($size) isn't an Array. If your window exists, check if the name of the title requested it's correct. $sTitle= "Title" WinWaitActive($sTitle,"", 1) If WinExists( $sTitle ) Then $size = WinGetPos($sTitle, "") If $size[0]>290 Then mousemove ($size[0]+1,$size[1]+1) mouseclick("left") Endif EndIf Thanks for help. It works. Link to comment Share on other sites More sharing options...
White76 Posted January 7, 2009 Share Posted January 7, 2009 русске везде ) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now