AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script to monitor a torrentsite for the torrents i want

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
zzzTAG



Joined: 22 Jun 2006
Posts: 6

PostPosted: Mon Jan 07, 2008 2:26 pm    Post subject: Script to monitor a torrentsite for the torrents i want Reply with quote

Hi,

One of my favorite torrent sites does not have a RSS feed service, so I'm trying to write a script that will monitor a webpage when i'm afk and download the torrents i want.

My idea for doing this was to set up a timer (not implemented yet) and then highlight the 6 latest torrents with a simple MouseClickDrag. The highlighted text gets copied and stored in a text file.

I then try to store each line in the text file as a variable and use IF VAR IN MATCHLIST to see if it needs to be downloaded. If its a yes the script will do a mouseclick on the download button.

Is there any easier way of doing this? I'm having trouble getting the IF VAR CONTAINS MATCHLIST part to function properly.

Testscript:

Code:

WinActivate, ahk_class OpWindow      ;activates opera web browser

MouseClick, Left, 100, 295      ;refreshes the list of torrents
Sleep, 10000

MouseClickDrag, Left, 340, 644, 700, 644 ;highlights the first torrent
Sleep, 100
Send ^c
FileAppend, %Clipboard% `n, C:\Documents and Settings\Tony\My Documents\torrentliste.txt

MouseClickDrag, Left, 340, 693, 700, 693
Sleep, 100
Send ^c
FileAppend, %Clipboard% `n, C:\Documents and Settings\Tony\My Documents\torrentliste.txt

MouseClickDrag, Left, 340, 745, 700, 745
Sleep, 100
Send ^c
FileAppend, %Clipboard% `n, C:\Documents and Settings\Tony\My Documents\torrentliste.txt

MouseClickDrag, Left, 340, 790, 700, 790
Sleep, 100
Send ^c
FileAppend, %Clipboard% `n, C:\Documents and Settings\Tony\My Documents\torrentliste.txt

MouseClickDrag, Left, 340, 842, 700, 842
Sleep, 100
Send ^c
FileAppend, %Clipboard% `n, C:\Documents and Settings\Tony\My Documents\torrentliste.txt

MouseClickDrag, Left, 340, 890, 700, 890
Sleep, 100
Send ^c
FileAppend, %Clipboard% `n, C:\Documents and Settings\Tony\My Documents\torrentliste.txt

FileReadLine, torrent1, C:\Documents and Settings\Tony\My Documents\torrentliste.txt, 1
FileReadLine, torrent2, C:\Documents and Settings\Tony\My Documents\torrentliste.txt, 2
FileReadLine, torrent3, C:\Documents and Settings\Tony\My Documents\torrentliste.txt, 3
FileReadLine, torrent4, C:\Documents and Settings\Tony\My Documents\torrentliste.txt, 4
FileReadLine, torrent5, C:\Documents and Settings\Tony\My Documents\torrentliste.txt, 5
FileReadLine, torrent6, C:\Documents and Settings\Tony\My Documents\torrentliste.txt, 6

if torrent1 contains desperate.housewives, king.of.the.hill, american.dad
MsgBox, test1
;MouseClick, Left, 870, 654
Sleep, 2000
;Send {ENTER}
WinActivate, ahk_class OpWindow
Sleep, 3000
Back to top
View user's profile Send private message
tic



Joined: 22 Apr 2007
Posts: 1786

PostPosted: Mon Jan 07, 2008 4:20 pm    Post subject: Reply with quote

a much better way would be to use urldownloadtofile and download it to a txt file and parse the information from it. i have done this several times. check out my mininova rss reader. even if its not rss that youre after, the code would be exactly the same in places
Back to top
View user's profile Send private message
zzzTAG



Joined: 22 Jun 2006
Posts: 6

PostPosted: Mon Jan 07, 2008 5:19 pm    Post subject: Reply with quote

Thank you!

I'll have a look.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group