Shell Function

  • Thread starter James Napolitano
  • Start date
J

James Napolitano

I am attempting to use the Shell function to open up
Internet Explorer and go to a specific URL.
Once I get to the site/page I then use the SendKeys
statement to Select All and Copy.
Before the Select All I use a delay loop to try to prevent
the Select All from happenning before the site is reached.
Although not the best method it is the only one available.
The problem I am having is timing. If the delay loop is
too short the Select All fires off too soon. If the delay
loop is too long the system slows downs and sometimes
hangs. I tried using the TaskID returned but that doesnt
help. The goal is to get to the site and page before doing
the Select All. Any help would be appreciated. Thanks.
 
C

Chad DeMeyer

Dim oIE
Set oIE = CreateObject("InternetExplorer.Application")
Do Until oIE.ReadyState = 4
WScript.Sleep 500
Loop
Set oIE = Nothing

Note: This is a VBScript example, which consequently uses late binding and
inexplicit object declaration. If you are using a different platform, make
changes accordingly.

cjd
 
J

James Napolitano

Thanks!
-----Original Message-----
Dim oIE
Set oIE = CreateObject("InternetExplorer.Application")
Do Until oIE.ReadyState = 4
WScript.Sleep 500
Loop
Set oIE = Nothing

Note: This is a VBScript example, which consequently uses late binding and
inexplicit object declaration. If you are using a different platform, make
changes accordingly.

cjd





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top