AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Wait till it's loaded

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Come Get You Some
Guest





PostPosted: Sun Apr 01, 2007 6:26 pm    Post subject: Wait till it's loaded Reply with quote

I got this script:

Code:

Run, c:\


It opens up the C:\-folder.
Then i want to do something in the folder but sometimes it is still loading and my mouseclick is already done. Sad

How can i let my script detect when the folder is loaded?
I can use imagesearch or sleep, but how else can i do it?
Thanks in advance!
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Sun Apr 01, 2007 7:11 pm    Post subject: Reply with quote

WinWaitActive
Sleep

both should help
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Come Get You Some
Guest





PostPosted: Sun Apr 01, 2007 7:27 pm    Post subject: Reply with quote

Yep. But sometimes the Window is active but it's content is still loading.
I use sleep but sometimes the window is loaded fast and the sleep is still 'sleeping' and then it's annoying for the user that uses ur program, he thinks the program hangs then.

And sometimes the window isn't loaded fast enough, and the given amount of time to sleep is passed already.

How can i let my script wait till the window is loaded?
Does anyone know the answer?
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sun Apr 01, 2007 8:29 pm    Post subject: Reply with quote

StatusBarWait, maybe. If there's no way to use that, then you really can't tell for sure without something more complicated like an ImageSearch.
Back to top
View user's profile Send private message
neXt



Joined: 19 Mar 2007
Posts: 461

PostPosted: Sun Apr 01, 2007 8:46 pm    Post subject: Reply with quote

WaitWinActive should work, i tried it for IE. Page was active but not yet loaded, script continued only after it was fully loaded.
P.S. But it did screw up 2 times out of 50 maybe.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group