Hi there, this is my first post so sorry if this seems like a silly question.
I am having a small issue trying to setup a macro that moves in and out of various dialogs. My issue is that a lot of the controls (e.g. Toolbar, OK button, etc) are custom controls and don't appear under the View System Windows dialog.
When I use the MouseOver or the PushButton functions, nothing happens.
Is there some other way I should be trying to access these controls?
Thanks,
Nige
Moving Mouse To Non-Standard Windows Control
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Use Image Recognition. Use the FindImagePos command. Capture the control to a bitmap and then have FindImagePos find it's X,Y position on the screen and move the mouse to it. See the example scripts, examples in the help file and here in the forum. Also see:
http://www.mjtnet.com/blog/2007/02/20/h ... cognition/
Using this technique you can find and control ANY object on the screen regardless of what kind of control it is. It could even be a button inside a remote X-Windows terminal.
http://www.mjtnet.com/blog/2007/02/20/h ... cognition/
Using this technique you can find and control ANY object on the screen regardless of what kind of control it is. It could even be a button inside a remote X-Windows terminal.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
I thought of using this function, but the toolbar items are on a gradient background. Also, the toolbar can run down the side of the screen or along the top of the screen. Depending on how the user has their toolbar setup, changes the gradient direction (hence changes the image). Do you suggest maybe taking an image of both toolbar items and using an if statement to find one or the other?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, capture each possibility and test for each one.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?