| View previous topic :: View next topic |
| Author |
Message |
Come Get You Some Guest
|
Posted: Sun Apr 01, 2007 6:26 pm Post subject: Wait till it's loaded |
|
|
I got this script:
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.
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
|
Posted: Sun Apr 01, 2007 7:11 pm Post subject: |
|
|
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 |
|
 |
Come Get You Some Guest
|
Posted: Sun Apr 01, 2007 7:27 pm Post subject: |
|
|
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
|
Posted: Sun Apr 01, 2007 8:29 pm Post subject: |
|
|
| 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 |
|
 |
neXt
Joined: 19 Mar 2007 Posts: 461
|
Posted: Sun Apr 01, 2007 8:46 pm Post subject: |
|
|
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 |
|
 |
|