Jump to content

uTorrent UDF


JohnOne
 Share

Recommended Posts

Thsi is Great. However i get an error that the theese varibales are not declared:

$uTorrentServerUsername

$uTorrentServerPassword

Both are in the _getList function. I solved it by replacing the variable with my credentials. Im guesing i could modify to take the input from the first command. But i just wanted to let you know :)

Link to comment
Share on other sites

  • 2 weeks later...

Got another issue. Whe n i try to use the _torrentaction fuction it crashes with the text:

C:Program Files (x86)AutoIt3Includeutorrent.au3 (177) : ==> The requested action with this object has failed.:
$objHTTP.Send()
$objHTTP.Send()^ ERROR

Any help would be appritiated. Im not familiar with the webb API and exactly what $objHTTP.Send() actualy does.

Link to comment
Share on other sites

  • 2 months later...

having a heck of a time trying to figure this out. i got utorrent set up to where i can access it through webui but now when i try in autoit using your example script, _TorrentAdd_URL returns false. here is what i did to do some debugging:

uTorrent.au3

Func _TorrentAdd_URL($sUser, $sPass, $sTorrentURL, $sIP = @IPAddress1, $sPort = "10405")
    $aParams = _Get_Token($sUser, $sPass, $sIP, $sPort)
    _ArrayDisplay($aParams) ;used for debugging
    $sURL = $aParams[0] & "?token=" & $aParams[1] & "&action=add-url&s=" & $sTorrentURL
    $temp = BinaryToString(InetRead($sURL), 1)
    ConsoleWrite( $temp & @CRLF & @error & @CRLF & $sURL & @CRLF) ;used for debugging
    If StringInStr($temp, '"build"') Then
        Return True
    Else
        Return False
    EndIf
EndFunc   ;==>_TorrentAdd_URL

Test.au3

#include-once
#include <utorrent.au3>
$result = _TorrentAdd_URL("Jon", "password", "http://ca.isohunt.com/download/509736411/disney.torrent") ;add a public domain torrent
ConsoleWrite($result & @CRLF) ;used for debugging

Console Output

--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop

1
http://Jon:password@192.168.0.5:10405/gui/?token=K3uxygcGXMl7ajzWtCNCNpCFFDor5kBFFVPlSTTPFf3OU1EjjpqB4TjlVVIA&action=add-url&s=http://ca.isohunt.com/download/509736411/disney.torrent
False
+>16:22:35 AutoIT3.exe ended.rc:0
>Exit code: 0    Time: 4.242

looks like $temp is coming back as an empty string and setting @error to 1.

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...