By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,058 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,058 IT Pros & Developers. It's quick & easy.

Automating Internet Explorer

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
ti**********@gmail.com (tinkerman) writes:
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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #2

P: n/a
On Sun, 19 Jun 2005 14:49:22 +0200, Lasse Reichstein Nielsen
<lr*@hotpop.com> wrote:
ti**********@gmail.com (tinkerman) writes:
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?


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.
Jul 23 '05 #3

P: n/a

IE does vbscript and vbs does have something for it, SendKeys method,
does work, then again, it may not be what you need actually, there might
be better ways to do what is it you need done, which I'm sure is not
pressing keys here and here, so, instead, be precise and specific on what
you need.

Danny

On Sun, 19 Jun 2005 05:08:25 -0700, tinkerman <ti**********@gmail.com>
wrote:
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


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #4

P: n/a
Lasse Reichstein Nielsen <lr*@hotpop.com> wrote in message news:<ps**********@hotpop.com>...
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
Jul 23 '05 #5

P: n/a
You can do these kind of automation easily with wsh on Windows.
Take a look into IeUnit at http://ieunit.sourceforge.net. The smart
bookmark feature might be something for you.

James X. Li

"tinkerman" <ti**********@gmail.com> wrote in message
news:1b**************************@posting.google.c om...
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

Jul 23 '05 #6

P: n/a
tinkerman wrote:
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

Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.