Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   How to create a hotkey to press a button? (http://www.go4expert.com/forums/create-hotkey-press-button-t26626/)

vuvanthanh 5Sep2011 10:25

How to create a hotkey to press a button?
 
1 Attachment(s)
I have a POS software which doesn't support hotkey to press a certain button. I have to press this button very often and having always to use mouse is slow and uncomfortable.
I tried to use AutoHotKey or AutoIt to emulate the mouse click. However, the problem is that AutoHotKey and AutoIt couldn't locate the button. This button control seems to be an internal object of the POS software and not visible to AutoHotKey and AutoIt.
Any suggestions? Thanks!

fabian1121 21Mar2012 00:47

Re: How to create a hotkey to press a button?
 
MouseMove() to the pos of the button maybe ? wouldn't it be easiest, i mean in AutoIt3, check the pos by AutoIt 3 Window Info.

phpdevelopment 23Jun2012 08:19

Re: How to create a hotkey to press a button?
 
You can work faster and more efficiently by using your keyboard instead of your mouse. HotKeyz is a keyboard utility that will boost your productivity and it is really great to use.

Once you’ve done that, paste the following into the script:
#Persistent
SetTimer, PressTheKey, 1800000
Return
PressTheKey:
Send, {Space}
Returnz

annaharris 17Sep2012 14:24

Re: How to create a hotkey to press a button?
 
Place the window in the top-left corner of your screen. Record a macro that moves the pointer all the way to the top left corner of your monitor, then down to the button and clicks it. Then you can run your macro however often you like, because no matter where your mouse pointer is, it will zoom up to the top left corner, then down to the button.


All times are GMT +5.5. The time now is 23:25.