Jump to content

Problem with Au3Info


Catorcio63
 Share

Recommended Posts

I started using AutoIt (v3.3.14.2) a couple of weeks ago.

I notice a problem with Au3Info. After setting the mouse coordinates mode to "client", I click in an entry in the menu bar of an application (whatever application with a menu bar) and I notice that the mouse coordinates are relative to the client area of the main window of that application, as expected. The click on the menu bar entry causes the corresponding menu list to pop up and now I move the mouse cursor on an entry of that menu list. This time I notice that the mouse coordinates are relative to the client area of the menu list (vs the client area of the main window).

The problem rises when using those coordinates in an AutoIt script.

So, in the script,  I set
Opt("MouseCoordMode", 2) ; 0=relative, 1=absolute, 2=client
then I activate the application, then I issue a first mouse click (MouseClick function) with the coordinates of the menu bar entry, and the script clicks in the right place and opens the menu list, then I issue a second mouse click with the coordinates of the menu list entry detected with Au3Info. But in the script execution, those coordinates are relative to the  client area of the main window (vs the client area of the menu list detected with  Au3Info), so the click ends up in the wrong place.

The same problem occurs by setting the mouse coordinates mode of Au3Info to "window".

Link to comment
Share on other sites

Hello Catorcio63 and welcome,

Have you tried setting the Opt with MouseCoordMode = 0 ?...like this:

Opt("MouseCoordMode", 0)  <-- This sets coords relative to the active Window.  ...Or you can do the following, which is the same thing:

AutoItSetOption("MouseCoordMode", 0)

Then also set Au3Info to "Window", so the finder tool knows what coordinates you're looking for.

...Then by using the "Position" coordinates under the Mouse Tab in Au3Info, you should get the correct clicks.

Let us know how it goes! :)

bloopie

Edited by bloopie
clarification
Link to comment
Share on other sites

Dear bloopie,

as I wrote in my original post, the same problem occurs by setting Au3Info to "Window".

The problem is that in Au3Info, setting "Coord Mod" to "Client" or "Window" refers to the client or window area of the control under the mouse, while in a script, setting Opt("MouseCoordMode", 0 or 1)  refers to the client or window area of the main window of the active application. Which is inconsistent.

Unfortunatelty, it is not possible to report the Au3Info version. Help > About just shows this text:

---------------------------
About
---------------------------
AutoIt v3 Window Information.

©2003-2015 Jonathan Bennett & AutoIt Team
Web:   http://www.autoitscript.com/autoit3/
Email:    support@autoitscript.com
---------------------------
OK   
---------------------------

However, I downloaded Au3Info from the  AuoIt site about 2 weeks ago (middle of September 2016).

Regards.

Link to comment
Share on other sites

Hello again,

While sometimes inconsistent, I just wanted to let you know what usually works for me.

Could you post some of the Au3Info summaries and maybe the whole part of the script related to the clicks, so we can see what you're working with? ...MouseClicks aren't always the best for some applications. I usually steer clear of MouseClicks and use ControlClicks whenever possible, so with some more information, we'll see what else we have to work with to come up with a solution. :)

bloopie

Edited by bloopie
Link to comment
Share on other sites

Hello Bloopie,

as (I hope) you can see in the picture, the x mouse coordinate 52 is clearly relative to the menu pane. Using that coordinate in the script issues a click at x coordinate 52 with respect to the main window, i.e. in the black area of the picture.

After looking at the Au3Info summary, which control ID do you suggest to use with ControlClick? :)

About finding a solution, I just calculated "manually" the right coordinates.

Regards.

 

Example.png

Link to comment
Share on other sites

Hello again,

Quote

After looking at the Au3Info summary, which control ID do you suggest to use with ControlClick?

Ahhh, it doesn't look like the tool can see much of the application in the first place, so you're better off using MouseClicks with this particular one.... :)

Had there been some instances listed there, I would use the "Advanced (Class):" control. It seems to be the most reliable with ControlClick, and I've had much success with that ID. :)

Quote

About finding a solution, I just calculated "manually" the right coordinates.

Excellent...I'm glad you got it sorted! Just out of curiosity, what were the coordinates you used?

==========

After seeing the summary, I don't think this issue was with the Finder Tool, or with Autoit...it looks like the application itself that was causing it (but that's just a guess). :)

Thanks for posting the screenshot and summary, it helped quite a bit!

Best Regards,

bloopie

Edited by bloopie
smiley issue :(
Link to comment
Share on other sites

Hello Bloopie,
unfortunately, this Au3Info problem does not occur only with that particular application.
Can we agree that it is a bug?
By the way, are you part of the AutoIt team? I mean, can you present this problem to the developers?
I have another problem, for which I open a separate post.

Best regards.

Link to comment
Share on other sites

Hello again,

No, I'm not part of the AutoIt team, and this doesn't really need to be elevated to the developers because I'm sure it's not a bug with Au3Info, or with AutoIt. :) This thread is public, and I'm sure some of the developers have already seen it. ;)

The Au3Info finder tool can't possibly work with every application (this is noted in the documentation)...and the tool is only reporting back what it can "see" in a given window or application. It's up to the applications themselves to present more information that the finder tool can "see", and that you can then utilize.

bloopie

Link to comment
Share on other sites

Well, I'll try to be proactive, hoping that a Au3Info developer will read and consider the following.

I think that the problem would be fixed by implementing the following requirement:

" If Au3Info is in "Window" (or "Client") "Coord Mod" and Au3Info cannot get any information about the control currently under the mouse cursor, then the mouse coordinates presented in the Au3Info GUI are relative to (client area of) the main window of the application currently under the mouse cursor".

Regards.

Link to comment
Share on other sites

  • Moderators

Catorcio63,

I suggest you open a Trac ticket, then the matter will definitely be seen by the Devs - you can also use the "BugTracker" tab in the menu at the top of the page

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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