Jump to content

Cron lite


Recommended Posts

Hello,

I want to create a crontab in autoit, to refresh a webpage every seconds, and the crontab have to launch himself each time the computer is switched on.

So, I wrote:

#NoTrayIcon
#include <IE.au3>
#include <File.au3>
if RegRead( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" ,"bot_cron") <> @ScriptDir & "\cron.exe" then
    RegWrite ( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" ,"bot_cron", "REG_SZ", @ScriptDir & "\cron.exe" )
endif
$url= _IECreate ("<My WebPage>",0,0)
while 1
    _IELoadWait ($url)
    Sleep(1000)
    _IEAction($url, "refresh")
WEnd

It perfectly works, but there is still a bit problem.

When it's compiled, every second, i can see the windows's hourglass near my mouse.

So, i wanted to know if it was possible to avoid this hourglass, by reducing the code source, or other.

Thank you very much, and please excuse my English, I am French

Edited by Killerthibs
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...