Sign in to follow this  
Followers 0
packrat

AU3Info "seeing" vs. AutoIt "seeing"

4 posts in this topic

Since there's a possibility that some readers may have skipped over a previous post of mine that had a very exact topic title (but which may have seemed to be of little interest to them), I'm revising that post with a more general title that might attract more interest and, hopefully, additional responses to those I received from two individuals (thanks!):

The AutoIt Help file section "Window Titles and Text (Basic)" states (about 2/3 down the page), "Whatever the Window Info Tool can see is what AutoIt can see."

As I'm trying to script a commercial application written in Java, the AU3Info tool indicates the title of a window and also the fact that its class is "SunAwtDialog". However, AutoIt seems NOT to be able to read the title of the same SunAwtDialog window, because, when I use WinWaitActive (or WinWaitNotActive) with SunAwtDialog window titles, my AutoIt scripts hang at that point. (The scripts do not hang if I substitute arbitrary Sleep commands in place of the WinWait... commands.) The WinWait... commands work with other Java windows automated by the script, just seemingly not with SunAwtDialog windows.

Does anyone know what's going on or have any solutions or workarounds? Is the AutoIt documentation in error when it states that AU3Info and AutoIt "see" the same things? I depend on the ability of AutoIt to read window titles. Thanks!

Harvey

Share this post


Link to post
Share on other sites



As I'm trying to script a commercial application written in Java, the AU3Info tool indicates the title of a window and also the fact that its class is "SunAwtDialog". However, AutoIt seems NOT to be able to read the title of the same SunAwtDialog window, because, when I use WinWaitActive (or WinWaitNotActive) with SunAwtDialog window titles, my AutoIt scripts hang at that point. (The scripts do not hang if I substitute arbitrary Sleep commands in place of the WinWait... commands.) The WinWait... commands work with other Java windows automated by the script, just seemingly not with SunAwtDialog windows.

You clearly said the CLASS was "SunAwtDialog", but you then proceeded to use that as the TITLE.

Did you set WinTitleMatchMode = 4 and use the advanced title properties "[CLASS:SunAwtDialog; INSTANCE:1]"?

:whistle:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

You clearly said the CLASS was "SunAwtDialog", but you then proceeded to use that as the TITLE.

Did you set WinTitleMatchMode = 4 and use the advanced title properties "[CLASS:SunAwtDialog; INSTANCE:1]"?

Well, "surprise, surprise" to me! I was not aware that the syntax of title matching had changed so radically in the past 6 months (I had been using 3.2.2 and just now upgraded), nor was I aware of how completely different AU3Info now is compared to the previous version (it's a whole new learning curve). Based on the "Window Titles and Text (Advanced)" page, "Mode 4" doesn't exist any more. There are references to it from other pages, but there are now only three title matching modes on that page. I hope this means I can now set title matching to Mode 2 (substring matches in the title) and sometimes also be able to specify a window by classname. (I was ready to suggest this combination as a possible "Mode5" until I saw the revised title matching page.)

What I meant by "SunAwtDialog window titles" was a title like this (using the previous syntax and setting Mode 4): WinWaitActive("classname=SunAwtDialog","",10). But, obviously, the problem may have been that the new version of AutoIt didn't recognize the older syntax. On the other hand, it didn't seem to inform me of an error but just "hung". Do you think that's the case?

Harvey

Share this post


Link to post
Share on other sites

"WinTitleMatchMode = 4" is correct... Its "advanced" mode

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