Jump to content
Sign in to follow this  
Revak

Newbie Do until question

Recommended Posts

Revak

Hello everyone, I need a little help with a Do Until coding I can't seem to make it right, see I want my auto it to replace objects until a "close" button pops up and I can't seem to make it right

Do
    MouseClick ( "left" )
    MouseMove ( 580,435 )
    MouseClick ( "left" )
    MouseMove ( 800, 420 )
    MouseClick ( "left" )
    MouseMove ( 640,435 )
    MouseClick ( "left" )
    MouseMove ( 800, 420 )
    MouseClick ( "left" )
    MouseMove ( 710,435 )
    MouseClick ( "left" )
    MouseMove ( 800, 420 )
    MouseClick ( "left" )
    MouseMove ( 580,500 )
    MouseClick ( "left" )
    MouseMove ( 800, 420 )
    MouseClick ( "left" )
    MouseMove ( 645,500 )
    MouseClick ( "left" )
    MouseMove ( 800, 420 )
    MouseClick ( "left" )
    MouseMove ( 710,500 )
    MouseClick ( "left" )
    MouseMove ( 800, 420 )
    MouseClick ( "left" )
    MouseMove ( 580,560 )
    MouseClick ( "left" )
    MouseMove ( 800, 420 )
    MouseClick ( "left" )
    MouseMove ( 640,560 )
    MouseClick ( "left" )
    MouseMove ( 800, 420 )
    MouseClick ( "left" )
    MouseMove ( 710,560 )
    Sleep (  100 )
    
Until WinActive("[CLASS:TspSkinButton; INSTANCE:2]", "")

So I'm thinking Winactive is not the good term right, but I looked and looked again and I don't know what I could use

Edited by Revak

Share this post


Link to post
Share on other sites
Revak

It never detects the window (the close button that popped up) and goes on and on moving my mouse :idea:

Edited by Revak

Share this post


Link to post
Share on other sites
hawky358

- Is this all within the same window?

- Does the Close button popup in a new window? Or is it like an installer with the last button being close?

Try to give a little more info.

You can try something like

until ControlGetText("<You window title here>","","[CLASS:TspSkinButton; INSTANCE:2]") = "close"

Share this post


Link to post
Share on other sites
hawky358

It never detects the window (the close button that popped up) and goes on and on moving my mouse

If the close button is in it's own window, you should use the Window's class or the title not the button.

You can also try WinExists() (Also using the Window's class/title)

Share this post


Link to post
Share on other sites
Revak

- Is this all within the same window?

- Does the Close button popup in a new window? Or is it like an installer with the last button being close?

Try to give a little more info.

You can try something like

until ControlGetText("<You window title here>","","[CLASS:TspSkinButton; INSTANCE:2]") = "close"

Yes it's all within the same window, thanks for your help i'll try this and let you know :idea:

Share this post


Link to post
Share on other sites
Revak

Thank you for your help, that worked :idea:

Edited by Revak

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  

×