Sign in to follow this  
Followers 0
Killerthibs

Cron lite

2 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



I think i can up from 3 page, but if i shouldn't have done this, tell me :whistle:

Share this post


Link to post
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
Sign in to follow this  
Followers 0