FusionAura Posted May 24, 2015 Posted May 24, 2015 (edited) Hi,I am trying to programatically use Autoit to migrate uTorrent files. I need to send the key Ctrl + D to uTorrent, and then fill in a dialogue box on the torrent location and the file location. However, I am stuck after opening uTorrent and trying to send the Ctrl D Command.This may not be the best but.Run("C:\Users\User\AppData\Roaming\uTorrent\uTorrent.exe")WinWaitActive("µTorrent 3.4.3 (build 40298) [32-bit]")ControlSend("µTorrent 3.4.3 (build 40298) [32-bit]", "", "", Send("^d")) That's the current code. I've tested this back with notepad to see if the code is working fine and it is, which make me struggle to understand why it wouldn't work for uTorrent. Could anybody help out please? Edited May 24, 2015 by FusionAura
JohnOne Posted May 24, 2015 Posted May 24, 2015 Because I believe µTorrent is a java app with non standard controls.Try just using Send(...) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
FusionAura Posted May 24, 2015 Author Posted May 24, 2015 Hi,uTorrent is actually written in C++, but yes, I've tried the basic Send with the WinWaitActive as per the basic example for notepad and it didn't work either
JohnOne Posted May 24, 2015 Posted May 24, 2015 (edited) Add this to top of scriptOpt("WinTitleMatchMode", 2)And remove "µ" from window title.EDIT: and look again at your parameters of ControlSend. Edited May 24, 2015 by JohnOne FusionAura 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
FusionAura Posted May 24, 2015 Author Posted May 24, 2015 (edited) I JUST SOLVED IT. Haha, Thanks for your solution tho, tried it out as well to be working I did it a different way tho, got the PID and used WinGetProcess to get the actual full title itself, my guess is the title of the program has some special characters thus the problem.I have another problem tho....When automating the dialog box itself, the title of the dialog box is "Choose where to download 12345 torrent", because 12345 torrent is a variable, i decided to match it to Choose where to download. Following your trend above, i did. Opt("WinTitleMatchMode", 2) ControlSend("Choose where to download", "", "[CLASSNN:Edit]", "C:\Users\Info\Desktop\12345") But it doesn't seem to match it Any idea how? Edit, Fixed it Thanks! Edited May 24, 2015 by FusionAura
argumentum Posted May 24, 2015 Posted May 24, 2015 did you know that you can run a program from within uTorrent ?expandcollapse popupYou can use the following parameters: %F - Name of downloaded file (for single file torrents) %D - Directory where files are saved %N - Title of torrent %P - Previous state of torrent %L - Label %T - Tracker %M - Status message string (same as status column) %I - hex encoded info-hash %S - State of torrent %K - kind of torrent (single|multi) Where State is one of: Error - 1 Checked - 2 Paused - 3 Super seeding - 4 Seeding - 5 Downloading - 6 Super seed [F] - 7 Seeding [F] - 8 Downloading [F] - 9 Queued seed - 10 Finished - 11 Queued - 12 Stopped - 13 Queued - 12 Preallocating - 17 Downloading Metadata - 18 Connecting to Peers - 19 Moving - 20 Flushing - 21 Need DHT - 22 Finding Peers - 23 Resolving - 24 Writing - 25 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
FusionAura Posted May 25, 2015 Author Posted May 25, 2015 Yes I did, but that doesn't work with what I'm trying to do. I'm adding a torrent, not running a program after the torrent is completed
JohnOne Posted May 25, 2015 Posted May 25, 2015 Have you tried the µTorrent UDF in example scripts? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now