Software and Tools Poker Forums

AHK creating hotkeys

or track by Email or RSS


Estist

Avatar for Estist

1038 posts
Joined 09/2010

I'm trying to create some hotkeys from scratch and atm. I've come as far as doing something like:

;# Time Bank #
;Space::
;MouseClick, left, 236, 18
;Sleep, 5

However, this moves the mouse and I would like the mouse to remain where I have it. Is there any way of doing this?

Any help appreciated.

Thanks Smile

Posted 11 months ago

Vandalar

Avatar for Vandalar

112 posts
Joined 08/2008

Estist

Avatar for Estist

1038 posts
Joined 09/2010

Hmmm not sure how that works it looks rather complex? Frown Also classNN is not showing in window spy for most buttons.

I was thinking more about being able to create boxes around a button and make them actionable by hotkey rather than the mouse having to go there and do the click. Not sure if this is possible of course.

Is nobody into auto hotkey here?

Posted 11 months ago

pasita

Avatar for pasita

1105 posts
Joined 09/2009

ControlSend would be optimal but most poker clients do not use the standard windows controls.

You have to do something like below. Store the mouse position, do the click, return mouse pointer back. id is where I've earlier stored the id of the client window. The WinActivate is not needed if your client window is active already.

BTW you could run into problems (clicking the wrong place) using the direct coordinates if you resize your window...



MouseGetPos ,mx,my,id
CoordMode ,mouse, relative

WinActivate , ahk_id %id%
WinWaitActive, ahk_id %id%
BlockInput, mousemove
click ,%clickx%,%clicky%

CoordMode ,mouse, Screen
MouseMove mx,my,0
BlockInput, mousemoveoff

Posted 10 months ago




HomePoker ForumsSoftware and Tools → AHK creating hotkeys