| View previous topic :: View next topic |
| Author |
Message |
Jag02
Joined: 16 Apr 2008 Posts: 43
|
Posted: Mon Oct 27, 2008 4:07 pm Post subject: Auto check forum updates |
|
|
The website I am talking about is one that has no Rss feeds.
I would like the computer to beep if new messages are posted in the forum. Also I want a message box to pop up and you have to push a button to close it before you can continue using the computer.
Please could you write a script that will do that. I am not very good at programming. |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Oct 27, 2008 4:08 pm Post subject: |
|
|
| you can use yahoo pipes service and code a rss feed for it |
|
| Back to top |
|
 |
Jag02
Joined: 16 Apr 2008 Posts: 43
|
Posted: Mon Oct 27, 2008 4:16 pm Post subject: |
|
|
| What do you mean by "yahoo pipes service and code a rss feed for it" ? |
|
| Back to top |
|
 |
vahju
Joined: 17 Feb 2008 Posts: 296
|
|
| Back to top |
|
 |
a buddy Guest
|
Posted: Tue Oct 28, 2008 5:08 am Post subject: Re: Auto check forum updates |
|
|
| Jag02 wrote: | The website I am talking about is one that has no Rss feeds.
I would like the computer to beep if new messages are posted in the forum. Also I want a message box to pop up and you have to push a button to close it before you can continue using the computer.
Please could you write a script that will do that. I am not very good at programming. |
| Code: |
#SingleInstance, force
#Persistent
URL = www.somesite.com ; put your url address here
urlDataFile = %A_Temp%\urlTEMPfile.txt
SetTimer, CheckChange, 30000 ;check for change every 30 seconds
return
CheckChange:
UrlDownLoadToFile, %URL%, %urlDataFile%
FileRead, newURLdata, %urlDataFile%
if (newURLdata != oldURLdata) {
MsgBox, %URL% has changed. New data is:`n%newURLdata%
oldURLdata := newURLdata
}
return |
If you really want "you have to push a button to close it before you can continue using the computer", replace the msgbox line in the above code with this:
| Code: | | MsgBox,4096,, %URL% has changed. New data is:`n%newURLdata% |
|
|
| Back to top |
|
 |
a buddy Guest
|
Posted: Tue Oct 28, 2008 8:25 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Jag02
Joined: 16 Apr 2008 Posts: 43
|
Posted: Thu Oct 30, 2008 7:01 am Post subject: |
|
|
| Your scripts are not working. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Oct 30, 2008 8:42 am Post subject: |
|
|
| Jag02 wrote: | | Your scripts are not working. | What is not working.
I tested the above code and it works well. I used URL = URL = http://www.autohotkey.com/forum/ and everytime anything on the page changed (current time, anything in stats area, or any of the sub-forum summeries) the change was detected. |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Thu Oct 30, 2008 8:50 am Post subject: |
|
|
| Quote: | | Please could you write a script that will do that. I am not very good at programming. |
"Your scripts are not working for me." That's something different. In 9 of 10 cases the error is sitting in front of the screen. How you can prove that it's definitely the script that isn't working - if you're 'not good at programming'? |
|
| Back to top |
|
 |
Jag02
Joined: 16 Apr 2008 Posts: 43
|
Posted: Thu Oct 30, 2008 11:01 am Post subject: |
|
|
I don't want script to check for time or anything else.
I just want it to check for new messages in the forum e.g www.autohotkey.com/forum/ |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2212 Location: switzerland
|
|
| Back to top |
|
 |
Guest
|
Posted: Thu Oct 30, 2008 12:03 pm Post subject: |
|
|
| Jag02 wrote: | I don't want script to check for time or anything else.
I just want it to check for new messages in the forum e.g www.autohotkey.com/forum/ |
Think about what you are asking. You want to compare the content of the page from one sample to the next, while filtering out what you are not interested in (in addition to html stuff). In any case it would be very site specific (depending on the forum software, etc).
That is a significant (even major) software task. IMHO, someone writing this for you isn't going to happen.
If you want to get 'good at programming' the code posted by a buddy gives you two variables containing the page samples - all you have to do is just filter it. Open the help file and start learning programming. |
|
| Back to top |
|
 |
Tomtom Guest
|
Posted: Fri Oct 31, 2008 12:44 pm Post subject: |
|
|
Use a Firefox extension: http://www.iopus.com/iMacros/firefox/
Its kind of like AHK for the browser
=> Write a short macro that checks on the website |
|
| Back to top |
|
 |
|