franov Posted April 5, 2006 Posted April 5, 2006 Hi, I'm curently using a script to reload a web page over and over, having the mouse go to the refresh/reload icon and click on it every 10 second or so.What I want is a script that makes the same thing using a refresh command directly instead of having the mouse doing it.I need this for a web page that basically need to be reloaded to display curent information every 10 sec. but i dont want to have to do it manually all day long.I need it for IE mainly, but i would like it to if someone could figure it out for Firefox.HotKeySet("{ESC}", "Terminate")While 1MouseClick("left", 343, 247, 2)Sleep, 10000WendFunc Terminate() ExitEndFunc
cdkid Posted April 5, 2006 Posted April 5, 2006 (edited) Firstly this is autoit v2 code Sleep, 10000 #include <IE.au3> for IE you could use IE.au3 (needs beta, can be found in Scripts & Scraps) and the _IEattach function like so HotKeySet("{ESC}","quit") $oie = _IEAttach("window title") While 1 Sleep(1000) _IEAction($oie, "refresh") _IELoadWait($oie) WEnd Func quit exit endfunc Donno about FireFox Edited April 5, 2006 by cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Bert Posted April 5, 2006 Posted April 5, 2006 do a send ("{F5}") while firefox or IE is active. Something like this:AutoItSetOption("WinTitleMatchMode", 2) while 1 select case WinActive("Internet Explorer") do send ("{F5}") sleep(10000) until not WinActive("Internet Explorer") ContinueLoop endselect wend The Vollatran project My blog: http://www.vollysinterestingshit.com/
archai2 Posted April 5, 2006 Posted April 5, 2006 This simple html page will do the job. Replace 'C:/yourpath/refresh.htm' with the one you will use on your local machine. Replace 'http://www.google.com/' with the URL you like. Sorry AutoIt'ers. :"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd"> <html> <head> <title></title> <META HTTP-EQUIV="Refresh" CONTENT="10;URL=file:///C:/yourpath/refresh.htm"> </head> <frameset framespacing="0" border="0" frameborder="0"> <frame name="myframe" src="http://www.google.com/" scrolling="no" noresize target="myframe" marginwidth="0" marginheight="0"> <noframes> <body> <p>This page uses frames, but your browser doesn't support them.</p> </body> </noframes> </frameset> </html>
Moderators SmOke_N Posted April 5, 2006 Moderators Posted April 5, 2006 This simple html page will do the job. Replace 'C:/yourpath/refresh.htm' with the one you will use on your local machine. Replace 'http://www.google.com/' with the URL you like. Sorry AutoIt'ers. :"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd"> <html> <head> <title></title> <META HTTP-EQUIV="Refresh" CONTENT="10;URL=file:///C:/yourpath/refresh.htm"> </head> <frameset framespacing="0" border="0" frameborder="0"> <frame name="myframe" src="http://www.google.com/" scrolling="no" noresize target="myframe" marginwidth="0" marginheight="0"> <noframes> <body> <p>This page uses frames, but your browser doesn't support them.</p> </body> </noframes> </frameset> </html>What are you sorry for?... I mean the user didn't ask... HEY... is there ANY language that can do this... they posted in the AutoIt forum, which to me means they are looking for an AutoIt solution... Kind of makes you look like a [edit]***[/edit] doesn't it? But hey... If the end result is they get it working... what the hay! Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Valuater Posted April 5, 2006 Posted April 5, 2006 i would think this would be the easiest While 1 send ("{F5}") sleep(10000) Wend doesnt matter which browser or support of frames 8)
Bert Posted April 5, 2006 Posted April 5, 2006 how many different ways can this be done? The Vollatran project My blog: http://www.vollysinterestingshit.com/
The Kandie Man Posted April 5, 2006 Posted April 5, 2006 You may want to check this out:https://addons.mozilla.org/firefox/115/ "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire
franov Posted April 6, 2006 Author Posted April 6, 2006 (edited) thx guys really help i like the F5 easy function one a lot, but because i cannot install anything on the computer that has the page that i need to refresh I m goint to say that the HTML code works awesome for my situation so thx all Edited April 6, 2006 by franov
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now