Jump to content
Sign in to follow this  
2dkot

Array stupid question

Recommended Posts

2dkot

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

Share this post


Link to post
Share on other sites
Josbe

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

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
Edited by Josbe

Share this post


Link to post
Share on other sites
2dkot

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.

Share this post


Link to post
Share on other sites
White76

русске везде )

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×