AutoHotkey Community

It is currently May 26th, 2012, 11:10 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Auto check forum updates
PostPosted: October 27th, 2008, 5:07 pm 
Offline

Joined: April 16th, 2008, 7:55 am
Posts: 43
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 27th, 2008, 5:08 pm 
you can use yahoo pipes service and code a rss feed for it


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 27th, 2008, 5:16 pm 
Offline

Joined: April 16th, 2008, 7:55 am
Posts: 43
What do you mean by "yahoo pipes service and code a rss feed for it" ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2008, 4:19 am 
Offline

Joined: February 17th, 2008, 8:52 pm
Posts: 314
Hope this helps.

http://pipes.yahoo.com/


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 28th, 2008, 6:08 am 
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%


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2008, 9:25 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 30th, 2008, 8:01 am 
Offline

Joined: April 16th, 2008, 7:55 am
Posts: 43
Your scripts are not working.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 30th, 2008, 9:42 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 30th, 2008, 9:50 am 
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'?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 30th, 2008, 12:01 pm 
Offline

Joined: April 16th, 2008, 7:55 am
Posts: 43
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/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 30th, 2008, 12:15 pm 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
rss for autohotkey forum
http://www.autohotkey.com/forum/topic16528.html


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 30th, 2008, 1:03 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 31st, 2008, 1:44 pm 
Use a Firefox extension: http://www.iopus.com/iMacros/firefox/

Its kind of like AHK for the browser :D

=> Write a short macro that checks on the website


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 56 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group