Refreshing Internet page, loop and checking for changes?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Krezydo
Newbie
Posts: 1
Joined: Wed Aug 30, 2006 2:16 am

Refreshing Internet page, loop and checking for changes?

Post by Krezydo » Wed Aug 30, 2006 2:27 am

I'm sorry, please don't think that I'm lazy cause I'm not, but I just can't figure it out.

What I'm trying to do is make a script for Internet Explorer. What it needs to do is use the webpage that is already open and refresh it constantly. But while doing that, I want it to check (in every refresh) for a sudden change in the page. Because I want to make it detecting the colour red in a specified area. And if the colour red gets detected, I want it to play a long beep sound or a specified wave-sound.


Please, can anyone make it for me or otherwise explain in details how to do such a thing? :S

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Aug 30, 2006 7:14 am

Hi,

To refresh the page you can just do:

SetFocus>Internet Explorer*
Press F5

To detect colour in a specified area use the GetPixelColor function. See here for a code snippet for searching a specific rectangle:
http://www.mjtnet.com/forum/viewtopic.php?t=1363

To play a wav file use the PlayWav function:
PlayWav>c:\somewavfile.wav

So all you need now is to dress that up in a loop.

Hope this helps.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts