queensoft Posted March 30, 2010 Share Posted March 30, 2010 I have a small script interacting with utorrent. One function sends !Y to a confirmation window. It works perfectly in Windows XP x86 (under VMWare) but not in Windows 7 Ultimate x64. Code is like this: AdlibRegister("MyAdlib", 250) Func MyAdlib() ; this is for Windows XP x86 if WinExists("µTorrent", "The torrent you are") Then WinActivate("µTorrent", "The torrent you are") Sleep(40) Send("!Y") EndIf ; this is for Windows 7 x64 if WinExists("µTorrent", "&Yes") Then WinActivate("µTorrent", "&Yes") Sleep(40) Send("!Y") EndIf EndFunc Even if I use Au3Info.exe or Au3Info_x64.exe under Windows 7 x64, it does not see the visible text corectly. It does not even select individual elements (icon, text). In Windows XP, I can select the icon or text label individually. In Windows 7 I have UAC off and custom Aero theme. I have AutoIt version 3.3.4.0 Script is compiled as x86 code. Link to comment Share on other sites More sharing options...
LarryDalooza Posted March 30, 2010 Share Posted March 30, 2010 Probably not your issue... but send "!y" ... not "!Y" ... "!Y" equates to "!+y". Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
queensoft Posted March 30, 2010 Author Share Posted March 30, 2010 Probably not your issue... but send "!y" ... not "!Y" ... "!Y" equates to "!+y".Lar.Indeed, that's NOT a problem. The Send command is working perfectly. Even too good, actually. Because I cannot read that exact confirmation message box, it send Yes to all sorts of other utorrent windows !!Is there another way to identify precisely that one window, some sort of parameter that does not change? Link to comment Share on other sites More sharing options...
queensoft Posted April 1, 2010 Author Share Posted April 1, 2010 Problem solved !!! Helpful advice from Alin Constantin (http://alinconstantin.homeip.net/) "Window class: DirectUIHWND DirectUI is a special window, with one big control (one HWND) and all other stuff (icon and text, in our case) painted on that control (with no separate HWNDs) You can try these programs : UISpy (http://www.bing.com/search?q=uispy&src=IE-SearchBox&FORM=IE8SRC) AccExplorer (http://www.microsoft.com/downloads/details.aspx?familyid=3755582A-A707-460A-BF21-1373316E13F0&displaylang=en)" And indeed, I have used inspect.ese from Acc package and found one very interesting fact! The text "The torrent you are trying....." is actually the name of the "window"!!! So now the function looks like this: AdlibRegister("MyAdlib", 250) Func MyAdlib() ; this is for Windows 7 x64 if WinExists("The torrent you are", "") Then WinActivate("The torrent you are", "") Sleep(40) Send("!Y") EndIf EndFunc Of course, I'll do some refinements, like get Windows version and execute just one Send instruction. Link to comment Share on other sites More sharing options...
queensoft Posted April 3, 2010 Author Share Posted April 3, 2010 Unfortunatelly, it doesn't work. I really don't know how it worked the first time I tried it !! Link to comment Share on other sites More sharing options...
gte Posted June 6, 2011 Share Posted June 6, 2011 Has anyone figured this out yet? WinExists and possibly WinActivate are not working in Win7 but working great in Vista HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script Link to comment Share on other sites More sharing options...
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