Automating Internet Explorer

T

tinkerman

Hello net friends,

I need to automate Internet Explorer in a very simple way.
I need to:

1. press refresh (F5) on the currently loaded website.
2. press END button.
3. Click a button somewhere on the screen with the mouse left button
(I'm not sure this button can be pressed directly via keysequence, not
via mouse, but it does have a name).
4. wait for a few seconds.
5. loop back to step 1.

I have managed to do the above with a windows macro tool, but my main
problem is that the macro only runs in the forground, thus negating
any other use of my PC while it is running (and it's supposed to run
indefinitely).
Since Internet explorer CAN run in the background, and since it can
run various script languages, I was wondering if such can be written
that will also run in the background and do what I want.

I've read about this on MicroSoft's webpage and it seems doable (e.g.
sending keystrokes to IE), but I understand that I might need to write
a HTML file which will open IE and then interact with it (because IE
cannot run a script file directly, i.e. if it's not embedded in a HTML
file).
I don't want to open a new IE window because the site I want to
interact with uses cookies for session information and I will be
forced to login which is a bit more complex.

Since I'm no internet programmer (although I do have programming
experience), and learning it all is no quick project, I was looking
for someone
with experience that could show me how to do it as simply and swiftly
as
possible, such as providing the few required lines of code and
the method to run them in IE (either directly or via an intermideate
HTML file).

Any help will be greatly appreceated.

thanks, TM
 
L

Lasse Reichstein Nielsen

I need to automate Internet Explorer in a very simple way.
I need to:

1. press refresh (F5) on the currently loaded website.
2. press END button.
3. Click a button somewhere on the screen with the mouse left button
(I'm not sure this button can be pressed directly via keysequence, not
via mouse, but it does have a name).
4. wait for a few seconds.
5. loop back to step 1.

Consider using an HTML Application that embeds the web site in an
iframe and scripts the behavior you want.

What is this poor web site that needs to be reloaded every few
seconds? You're not trying to increase the hit count of web
advertising, are you?
/L
 
J

Jim Ley

Consider using an HTML Application that embeds the web site in an
iframe and scripts the behavior you want.

What is this poor web site that needs to be reloaded every few
seconds? You're not trying to increase the hit count of web
advertising, are you?

Sounds like it might be a screen capturing system?

http://iecapt.sourceforge.net/

might be a better combination, combined with an IFRAME system if you
need something more complicated maybe.

Jim.
 
T

tinkerman

Lasse Reichstein Nielsen said:
Consider using an HTML Application that embeds the web site in an
iframe and scripts the behavior you want.

What is this poor web site that needs to be reloaded every few
seconds? You're not trying to increase the hit count of web
advertising, are you?
/L

No, don't worry, I'm not trying to cheat web advertising (but smart
thinking from your side...)
Actually, I want to capture snapshots of a web page every minute or
so, and sometimes press a button to submit something.
I was thinking along the lines you suggested, and even saw some
Javascript programs (real simple and easy to use, just click them in
windows explorer and they run) but don't know how to build an iFrame
and such.
As I said, I'm no real Javascript programmer, and don't have the time
to learn the development environement. Just need the few lines of code
to do it and how to run it...:
1. Load the web page.
2. Login.
3. Refresh page.
4. Go to end of page.
5. Press a button at a fixed place in the page (maybe it can be
"pressed virtually" using it's name instead of actually with a mouse).
6. Add some delay (time of day dependent, 30sec-3minutes)
7. Loop to 3.

If I can run the script inside a currently open and login'ed page,
then steps 1-2 are unnecessary.
As I said, I've got it running great with a macro, I don't have this
macro installed on all systems I want, or can.

Thanks for your support.
cheers, TM
 
C

Csaba Gabor

tinkerman said:
Hello net friends,

I need to automate Internet Explorer in a very simple way.
I need to:

You can do this with VBScript. That is, you can write a .vbs file in
vbscript that will do all you want. However, you may need to learn a
bit of javascript as it relates to accessing the DOM (document object
model) of the site that you are interested in.

Anyway, search google groups for the following to get plenty of
examples:
vbscript automate ie group:*.vbscript.*

Csaba Gabor from Vienna
PS. And use .refresh to refresh IE
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top