zzzTAG
Joined: 22 Jun 2006 Posts: 6
|
Posted: Mon Jan 07, 2008 2:26 pm Post subject: Script to monitor a torrentsite for the torrents i want |
|
|
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
|
|
|