Sign in to follow this  
Followers 0
jafuuu

WinWaitActive Stuck!

6 posts in this topic

Hello guys, I got a problem...

I'm do a loop, but in one steep of the scrip I use a WinWaitActive command, somethimes my bot stop working because the window for "WinWaitActive" never get active, so I get stuck =/

I try to use a "Do...Until", but this only "Do...Until" one time!, so... There is anyway to continue doing "Do...Until" again and again until the window get active?

Look my code:

While 1
ShellExecute("http://anypage.com/")
Sleep (6000)
Do
    Send ("^{F12}")
Until WinWaitActive ("Firebug -","","")
WinSetState ("Firebug -","",@SW_MAXIMIZE)
Sleep (500)
MouseMove (92, 58, 0)
MouseClick ("left",92,58)
Wend

My loop works, but somethimes get stucked for that (problem are because Internet lag)!

Please help :) !

Share this post


Link to post
Share on other sites



Your using winwaitactive() wrong. Winwaitactive() stops your script until the window "Firebug -" appears. Not to be used as a Do-Until expression. What are you trying to do?

Share this post


Link to post
Share on other sites

Your using winwaitactive() wrong. Winwaitactive() stops your script until the window "Firebug -" appears. Not to be used as a Do-Until expression. What are you trying to do?

But, I need to stop my script until "Firebug -" Windows is active.

What is your suggestion?, What command I need to use to stop my script until I get a windows active?

Share this post


Link to post
Share on other sites

WinWaitActive("Firebug -", "", "")
Do
Send("^{F12}")
Until Not WinActive("Firebug -")

Share this post


Link to post
Share on other sites

WinWaitActive("Firebug -", "", "")
Do
Send("^{F12}")
Until Not WinActive("Firebug -")

Explain to me, because doesn't work...

Maybe you don't understand my post...

I only need to do "Do..Until" again and again until the "FireBug -" windows is active :/!

Is possible to do a loop until a window is active?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Explain to me, because doesn't work...

Maybe you don't understand my post...

I only need to do "Do..Until" again and again until the "FireBug -" windows is active :/!

Is possible to do a loop until a window is active?

Oh, well in that case like this:

Do
Send("^{F12}")
Until WinActive("Firebug -")

The other example would wait until it was active, then "Do Until" it was NOT active..

Edited by bchris01

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  
Followers 0