An enhanced version of my previous script.
Code:
#SingleInstance, force
#Persistent
URL = http://portableapps.com/forums/development/portable_app_development ; put your url address here
;URL = http://www.autohotkey.com/forum/forum-1.html ; put your url address here
;URL = http://www.autohotkey.com/docs/Variables.htm ; put your url address here
urlDataFile = %A_Temp%\urlTEMPfile.txt
OnExit, CleanUP ; delete temp file on script exit
UrlDownLoadToFile, %URL%, %urlDataFile% ; get a copy of url data to compare against
FileRead, oldURLdata, %urlDataFile%
SetTimer, CheckChange, 30000 ;check for change every 30 seconds
return
CheckChange:
UrlDownLoadToFile, %URL%, %urlDataFile%
FileRead, newURLdata, %urlDataFile%
if (newURLdata != oldURLdata) {
MsgBox, %URL% has changed.
; MsgBox New data is:`n%newURLdata% ; uncomment this line if you want to see the new data in a message box
oldURLdata := newURLdata
}
return
CleanUp:
FileDelete, %urlDataFile%
exitapp
When testing the below script, I notice that if you enter an AHK forum url, there are frequent changes detected that do no appear on the screen (although it does settle down after a while).
Investigating that, apparently some html format code changes - I don't know why. If you enter a web page or the portable-apps forum (as setup in the script) it works well.