Macro Toolworks Products Discussion Forums :: General Discussion
Welcome Guest   
 Subject :Window controls.. 17-04-2011 21:20:20 
hans.list@gmail.com
Joined: 14-04-2011 07:18:48
Posts: 6
Location: Holland
Can MTW manipulate Window controls directly, e.g. simulating mouse click or typing text into a control.

Example: Click on the C(lear) button of the Calculator.

HL
IP Logged
 Subject :Re:Window controls.. 18-04-2011 10:28:35 
petr
Joined: 15-10-2009 11:48:52
Posts: 195
Location
Hello,

yes, this is possible. Howver, this claculator example is not very good example is not very good sample because although the claculator clear button displays [C] the control (of class "Button") itself does not have any title and thus cannot be recognized from other claculator buttons. This is how MTW describes the "path" to the control:

[Calculator|CalcFrame|#0|#0]\[|CalcFrame|#0|#0]\[|\#0|#0|#0]\[|Button|#0|#0]

As you can see, there si nothing that would indicate that this is "clear" button.

In such a case I would recommend to use <win_findimage> command that can match what is showing on window (display) against a bitmap picture you prepare in advance. The command then simply compares what is on the screen with the bitmap picture in a file and allows to navigate mouse to proper position.

Best regards,
Petr
IP Logged
Seite # 


Powered by ccBoard


Melden Sie sich an, teilen Sie Ihre Erfahrungen - senden Sie Nachrichten an die Foren und kommentieren Sie Beispiele, Befehlsbeschreibungen und andere Hilfsquellen.



Die Mitgliedschaft ist kostenlos, die Anmeldung einfach.