Sign in to follow this  
Followers 0
queensoft

Au3Info / WinExists and WIndows 7 x64

6 posts in this topic

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.

post-30661-12699429426425_thumb.jpg

Share this post


Link to post
Share on other sites



Probably not your issue... but send "!y" ... not "!Y" ... "!Y" equates to "!+y".

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Unfortunatelly, it doesn't work. I really don't know how it worked the first time I tried it !!

Share this post


Link to post
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
Sign in to follow this  
Followers 0