Jump to content

Automating utorrent ?


Recommended Posts

hi, wanted to know if there is a way to write such automatic utorrent script: the script will download torrents in predefined folder , identify every time a torrent finished downloading , delete that specific torrent and redownload it again in an endless loop

I will be glad if anyone gives me an example to such script

Link to comment
Share on other sites

hi, wanted to know if there is a way to write such automatic utorrent script: the script will download torrents in predefined folder , identify every time a torrent finished downloading , delete that specific torrent and redownload it again in an endless loop

I will be glad if anyone gives me an example to such script

Maybe this can get you started. Another, easier way to check if a torrent has finished downloading is by using Utorrents "launch application when torrent has finished" and then search for that particelar process.

WinWait("[REGEXPTITLE:Torrent.\d+.*$]")
WinSetState("[REGEXPTITLE:Torrent.\d+.*$]","",@SW_SHOWNORMAL)
Do
    
$GetWST = WinGetState("[REGEXPTITLE:Torrent.\d+.*$]")
If $GetWST = BitAND(21,23) Then
    WinSetState("[REGEXPTITLE:Torrent.\d+.*$]","",@SW_SHOWNORMAL)
    WinSetState("[REGEXPTITLE:Torrent.\d+.*$]","",@SW_HIDE)
EndIf
    
$title = "[REGEXPTITLE:Torrent.\d+.*$]"
$listcontrol = "[CLASSNN:SysListView322]"

$hWnd = ControlGetHandle( $title, "", $listcontrol )
$header_hWnd = _GUICtrlListView_GetHeader($hWnd)

$Torrentname = ""
$FindTN = _GUICtrlListView_FindInText($HWND, $Torrentname)
$TEST = _GUICtrlListView_GetItemText($HWND, $FindTN)
$ccount = ControlListView("[REGEXPTITLE:Torrent.\d+.*$]", "", "SysListView322", "GetSubItemCount")
$icount = ControlListView("[REGEXPTITLE:Torrent.\d+.*$]", "", "SysListView322", "GetItemCount")


Dim $listarray[$ccount][$icount+1]
For $c = 0 To $ccount-1
    $listarray[$c][0] = _GUICtrlListView_GetItemText($header_hWnd, $c)
   $Countmore = $icount - $FindTN
   For $i = $FindTN To $icount-$Countmore
        $itemtext = _GUICtrlListView_GetItemText($hWnd, $i, $c)
        $listarray[$c][$i+1] = $itemtext
    Next
Next
For $c = 0 To $ccount-1
    ;ConsoleWrite($listarray[$c][0])
    For $i = 0 To $icount-1
        ;ConsoleWrite($listarray[$c][$i+1])
    Next
    ;ConsoleWrite("|")
Next
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...