Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ash ash is offline
external usenet poster
 
Posts: 54
Default Detecting Change in State of Internet Explorer

I'm writing a macro to copy data to and from a web page using mainly the send
keys function. Currently I have set a long wait period in the code while the
site updates. This not only makes the macro run slower than it needs to but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account information.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Detecting Change in State of Internet Explorer

Why automate IE ?
Here's 1 example :
http://support.microsoft.com/kb/167658

NickHK

"Ash" ...
I'm writing a macro to copy data to and from a web page using mainly the
send
keys function. Currently I have set a long wait period in the code while
the
site updates. This not only makes the macro run slower than it needs to
but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account information.



  #3   Report Post  
Posted to microsoft.public.excel.programming
ash ash is offline
external usenet poster
 
Posts: 54
Default Detecting Change in State of Internet Explorer

While automating IE should work I am limited in the way I can access the site
because of company policy. I need to find a way to find out when the site
has loaded the second page.

"NickHK" wrote:

Why automate IE ?
Here's 1 example :
http://support.microsoft.com/kb/167658

NickHK

"Ash" ...
I'm writing a macro to copy data to and from a web page using mainly the
send
keys function. Currently I have set a long wait period in the code while
the
site updates. This not only makes the macro run slower than it needs to
but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account information.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Detecting Change in State of Internet Explorer

Does that mean you cannot automate IE ?

Or you can talk directly to the server.

NickHK

"Ash" ...
While automating IE should work I am limited in the way I can access the
site
because of company policy. I need to find a way to find out when the site
has loaded the second page.

"NickHK" wrote:

Why automate IE ?
Here's 1 example :
http://support.microsoft.com/kb/167658

NickHK

"Ash" ...

I'm writing a macro to copy data to and from a web page using mainly
the
send
keys function. Currently I have set a long wait period in the code
while
the
site updates. This not only makes the macro run slower than it needs
to
but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account
information.






  #5   Report Post  
Posted to microsoft.public.excel.programming
ash ash is offline
external usenet poster
 
Posts: 54
Default Detecting Change in State of Internet Explorer

I can do very little. I am restricted to beed able to use send keys to
select a textbox on the site and goto the enter button. after that It using
send keys again to select information.

"NickHK" wrote:

Does that mean you cannot automate IE ?

Or you can talk directly to the server.

NickHK

"Ash" ...
While automating IE should work I am limited in the way I can access the
site
because of company policy. I need to find a way to find out when the site
has loaded the second page.

"NickHK" wrote:

Why automate IE ?
Here's 1 example :
http://support.microsoft.com/kb/167658

NickHK

"Ash" ...

I'm writing a macro to copy data to and from a web page using mainly
the
send
keys function. Currently I have set a long wait period in the code
while
the
site updates. This not only makes the macro run slower than it needs
to
but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account
information.








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Detecting Change in State of Internet Explorer

If you can ONLY use SendKeys as a requirements, then it seems you in for
alot of trouble every time there is a small layout change in the controls on
the pages etc.
Good luck.

And I suppose an Excel web query is out of the question ?

NickHK

"Ash" ...
I can do very little. I am restricted to beed able to use send keys to
select a textbox on the site and goto the enter button. after that It
using
send keys again to select information.

"NickHK" wrote:

Does that mean you cannot automate IE ?

Or you can talk directly to the server.

NickHK

"Ash" ...

While automating IE should work I am limited in the way I can access
the
site
because of company policy. I need to find a way to find out when the
site
has loaded the second page.

"NickHK" wrote:

Why automate IE ?
Here's 1 example :
http://support.microsoft.com/kb/167658

NickHK

"Ash" ...

I'm writing a macro to copy data to and from a web page using mainly
the
send
keys function. Currently I have set a long wait period in the code
while
the
site updates. This not only makes the macro run slower than it
needs
to
but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect
a
change. Eg when the site move from account search to account
information.








  #7   Report Post  
Posted to microsoft.public.excel.programming
ash ash is offline
external usenet poster
 
Posts: 54
Default Detecting Change in State of Internet Explorer

It's been interesting. I've got everytthing working perfect apart from when
the web based system is running sluggish and the wait time I have for a web
page isn't long enough.

"NickHK" wrote:

If you can ONLY use SendKeys as a requirements, then it seems you in for
alot of trouble every time there is a small layout change in the controls on
the pages etc.
Good luck.

And I suppose an Excel web query is out of the question ?

NickHK

"Ash" ...
I can do very little. I am restricted to beed able to use send keys to
select a textbox on the site and goto the enter button. after that It
using
send keys again to select information.

"NickHK" wrote:

Does that mean you cannot automate IE ?

Or you can talk directly to the server.

NickHK

"Ash" ...

While automating IE should work I am limited in the way I can access
the
site
because of company policy. I need to find a way to find out when the
site
has loaded the second page.

"NickHK" wrote:

Why automate IE ?
Here's 1 example :
http://support.microsoft.com/kb/167658

NickHK

"Ash" ...

I'm writing a macro to copy data to and from a web page using mainly
the
send
keys function. Currently I have set a long wait period in the code
while
the
site updates. This not only makes the macro run slower than it
needs
to
but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect
a
change. Eg when the site move from account search to account
information.









  #8   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default Detecting Change in State of Internet Explorer

Ash wrote:
I'm writing a macro to copy data to and from a web page using mainly the send
keys function. Currently I have set a long wait period in the code while the
site updates. This not only makes the macro run slower than it needs to but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account information.


It sounds like you are using SENDKEY (ugh!) to enter info on a web
page, click enter or some similar button and then a new web page
appears. If you are trying to detect when this new page is fully
loaded, insert something like the following loop in your code...Ron

Do Until .ReadyState = READYSTATE_COMPLETE And Not .Busy
DoEvents
Loop

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Detecting Change in State of Internet Explorer

Not sure if this helps but I use this to wait for a response, I have in the
past also used the OnTime function to time this out if needed.

Sub WebLink()
Set ie = CreateObject("InternetExplorer.Application")

sURL = "http://www.yourpage.com"

ie.Navigate sURL

'wait for response
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

ie.Visible = True

ie.Quit
Set ie = Nothing

End Sub


--
Cheers
Nigel



"Ash" wrote in message
...
I'm writing a macro to copy data to and from a web page using mainly the
send
keys function. Currently I have set a long wait period in the code while
the
site updates. This not only makes the macro run slower than it needs to
but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account information.



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Detecting Change in State of Internet Explorer

You can also try SWExplorerAutomation SWEA (http://webunittesting.com).
SWEA makes IE automation a very simple task.

Ash wrote:
I'm writing a macro to copy data to and from a web page using mainly the send
keys function. Currently I have set a long wait period in the code while the
site updates. This not only makes the macro run slower than it needs to but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account information.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer da Excel Discussion (Misc queries) 4 October 9th 08 09:31 PM
Excel/VBA/Internet Explorer Alex[_30_] Excel Programming 1 November 22nd 05 05:09 PM
internet explorer doris Excel Discussion (Misc queries) 1 January 5th 05 09:44 PM
detecting the state of filters Chris Spencer Excel Programming 2 October 21st 03 01:40 AM
Detecting Calculation State Chris Gorham[_2_] Excel Programming 3 July 15th 03 11:40 AM


All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"