| View previous topic :: View next topic |
| Author |
Message |
marcelo Contributor


Joined: 10 May 2008 Posts: 155
|
Posted: Sun Jul 27, 2008 6:37 pm Post subject: shell open |
|
|
Hi, me again...
I'm trying to open a webpage and when it finish loading send data using "window send"
An example of this could be:
shell open,"http://www.google.com"
%W = @winactive()
clipboard set,%%data
window send,%W,@ctrl(v)
window send,%W,@cr()
the problem is: I can't wait to the page finish loading, i tryed
shell open,"http://www.google.com",,,WAIT
but this didn't work.
How can i wait to the page loads complete for the next command to be executed? |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jul 28, 2008 1:29 pm Post subject: |
|
|
You could try using the WAIT command. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Jul 28, 2008 8:40 pm Post subject: |
|
|
Uhh, doesn't the wait command on that line cause your script to actually wait until whatever program you just opened, closes??
I would suggest using the browser element in VDS itself since it offers you the ability to know when a page is completed it's loading. You will not(that I know of) be able to ever find out when Internet Explorer is loading or not loading a page because we can't dig into it far enough with VDS as we'd like to. MS really made it tough to dig into it. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
marcelo Contributor


Joined: 10 May 2008 Posts: 155
|
Posted: Mon Jul 28, 2008 11:45 pm Post subject: |
|
|
| Thanks a Lot!! I will try this... |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Jul 30, 2008 1:54 pm Post subject: |
|
|
Marcelo,
I was thinking You could walk the controls in the browser window and look for the status bar. When the text on the status bar says Done then I would say that the page is complete. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Jul 30, 2008 3:12 pm Post subject: |
|
|
Try this code...
| Code: |
Title Check to see if IE is complete...
# Open an instance of IE 6.x
Shell Open,http://www.google.com
# Find IE's statusbar
%%IEFrame = @winexists(#IEFrame)
If %%IEFrame
%%Child = @Window(%%IEFrame,CHILD)
If %%Child
%%ChildClass = @winclass(%%Child)
While @unequal(%%ChildClass,#msctls_statusbar32)
%%Child = @Window(%%Child,NEXT)
%%ChildClass = @winclass(%%Child)
Wend
%%IEStatusbar = %%Child
End
End
# Give a little wait just incase there is already
# something loaded in IE.
wait 0.5
# Wait until IE's statusbar text says Done
While @unequal(@wintext(%%IEStatusbar),Done)
wait 0.5
wend
Info IE has finished loading the page.
Exit
|
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|