Posts: 9
Threads: 3
Joined: Sep 2013
Hello,
I am new to QM. One reason I might like to prefer QM over alternatives is the recorder. I recorded this script:
int w1=act(win("RegexBuddy" "TFormRegexBuddy"))
lef 296 255 w1 1 ;;TdxTabContainerDockSite 'Use'
lef 338 257 w1 1 ;;TdxTabContainerDockSite 'Library'
One thing I noticed is that it is recording mouse coordinates. In some of my applications, things move around (even in the client area), and thus cannot be reliably located by pixel coordinates. I see that the recorder also is adding (what I think are) comments to the recorded script. These seem to identify Windows by their Class and Text. Is there a way to ask Quick Macros to record a script which references the Class and Text by default instead of using mouse coordinates? I did not see such an option. I did also read the help documentation about Recording but did not see anything immediately related to this concern.
Thanks!
Posts: 12,051
Threads: 140
Joined: Dec 2002
The comments actually are created from various information sources, mostly from accessible object info.
You can set the recorder to record coordinates relative to controls, but not to accessible objects.
Controls are child windows in a window. Accessible objects are smaller objects in a window or control.
To create code to click accessible object, use "Accessible object actions" dialog. It's in the floating toolbar.
Posts: 9
Threads: 3
Joined: Sep 2013
Thank you for the information. I can see that these single-step recorders (Window, Control, Accessible Object, HTML Element, Image, etc...) can be very useful, each in their own right. It would perhaps be too complicated to use all these information sources in the general purpose recorder. But still... it is something to think about for the future. An "accessibility" mode of the recorder which tries its best to track interactions by window/control/class/role/accessibility attributes and not by coordinates. Okay, enough about that.
I like how QM helps you build the calls to the various functions and parameters necessary to automate, given the challenges of the particular app: Win32 HWND/Accessible/IHTMLElement COM, Image recognition, etc. I think I am sold.
Now for a big question: When is
MSUIA support coming?
Posts: 12,051
Threads: 140
Joined: Dec 2002
Quote:it is something to think about for the future. An "accessibility" mode of the recorder which tries its best to track interactions by window/control/class/role/accessibility attributes and not by coordinates
Yes, in the future.
Quote:When is MSUIA support coming?
UIA has low priority in QM development because it adds almost nothing new to MSAA that QM need.
Posts: 9
Threads: 3
Joined: Sep 2013
Gintaras Wrote:UIA has low priority in QM development because it adds almost nothing new to MSAA that QM need.
I understand. But, I have some applications developed with Delphi that are responding to
IUIAutomationElement::SetFocus but not to MSAA SetFocus (actually I don't know if there is a SetFocus that belongs to MSAA, but it's whatever Visual Studio inspect.exe uses when in MSAA mode).
I found this out by using inspect.exe from Visual Studio, which has both a UIA and MSAA mode. I went through every single Window in the Delphi application tree in MSAA mode and executed MSAA Set Focus on them, and could not get the application to respond. But, the application responded to inspect.exe SetFocus when in UIA mode. So, I conclude from this that I will not be able to use QM to set control focus thru accessibility on this Delphi Application because QM uses only MSAA.
I am only one user and you must consider how many people need UIA, especially when MSAA works 95% of the time for 95% of them. I am just leaving this feedback for future consideration. Eventually you will need UIA but I guess it may be 5 years from now
.
I can probably figure out some solution with QM anyway using Win32 + text + client rect mouse clicking. My macros must use very little pixel positioning because I will develop for a wide variety of screen resolutions and DPI (/text size).
Posts: 22
Threads: 8
Joined: Jul 2009
I am also looking forward for an "accessibility" mode.
I cannot just share a script with my colleagues because they have other resolutions -.-