Poker

Ask gaming related questions
SalePepeCumino
Posts: 11
Joined: 13 Nov 2020, 09:47

Poker

13 Nov 2020, 10:03

Hello Everyone!

My name is Manuel and I'm new in this community.
I am looking for a script that can interface with a poker room client. My goal would be to be able to bet pot percentages by pressing hotkey on the keyboard (for example, if I press "F1" it bets 33% of the pot, if I press "F2" it bets 50%, and so on).
I imagine that everything has to be configured by giving it the space in which to usually insert the percentage of the pot as coordinate.

Do you have any suggestion? This is the second month I'm looking for something ready, but I think I have to write the script by myself, so here we are.

Thank you everybody for your kind,
User avatar
mikeyww
Posts: 3965
Joined: 09 Sep 2014, 18:38

Re: Poker

13 Nov 2020, 10:14

My suggestion is to search the forum for poker. You'll find scripts and discussions about it. An example is below.

https://www.autohotkey.com/boards/viewtopic.php?f=76&t=82357
doubledave22
Posts: 61
Joined: 08 Jun 2019, 17:36

Re: Poker

13 Nov 2020, 10:28

Theres a few programs written out there by AHK members that do this actually. They are paid however. Look into IntuitiveTables or StackandTile
SalePepeCumino
Posts: 11
Joined: 13 Nov 2020, 09:47

Re: Poker

18 Nov 2020, 04:02

Thank you guys for your answers, I hope somebody will answer with some suggestions on how to setting up a script wih AHK.
User avatar
boiler
Posts: 6631
Joined: 21 Dec 2014, 02:44

Re: Poker

18 Nov 2020, 06:42

mikeyww posted a link to a thread that discusses that exact topic. The suggestions you are seeking appear in that thread.
SalePepeCumino
Posts: 11
Joined: 13 Nov 2020, 09:47

Re: Poker

18 Nov 2020, 16:01

So guys this is what I put in the script and all its working fine:

Code: Select all

F1::
IfWinActive,ahk_class QWidget
{
	Send {Click 499, 435}
	Click, 2,
	Sleep, 250,
	SendInput, 2,20
	Send, {Enter}
	return
}

F2::
IfWinActive,ahk_class QWidget
{
	Send {Click 499, 435}
	Click, 2,
	Sleep, 250,
	SendInput, 2,50
	Send, {Enter}
	return
}

F3::
IfWinActive,ahk_class QWidget
{
	Send {Click 499, 435}
	Click, 2,
	Sleep, 250,
	SendInput, 3,
	Send, {Enter}
	return
}

MButton::

IfWinActive,ahk_class QWidget
{
	Send {Click 275, 414}
	return
}
[Mod edit: [code][/code] tags added.]

But when I use Hotkeys F1, F2, F3 and Mbutton, I would like to use them ALSO when the window under my mouse position is not activated.
It would be also amazing if I could click my hotkeys without moving the mouse to the position of the click. Is it possible to do?
For the first problem I think I could use "MouseGetPos" but I didn't understand how setting up it.

Thank you for your attention,
User avatar
boiler
Posts: 6631
Joined: 21 Dec 2014, 02:44

Re: Poker

18 Nov 2020, 16:20

SalePepeCumino wrote: But when I use Hotkeys F1, F2, F3 and Mbutton, I would like to use them ALSO when the window under my mouse position is not activated.
...For the first problem I think I could use "MouseGetPos" but I didn't understand how setting up it.
Yes, MouseGetPos does help you do that. You can have it activate the window under the mouse when you press the hotkey:

Code: Select all

F1::
	MouseGetPos,,, WinID
	WinActivate, ahk_id %WinID%
	; your other code here
return
If you don't want it to activate the window at all, then you have to use ControlSend and ControlClick to send to the window you've identified as being under the mouse without activating it. This doesn't work for all windows, but you can try it.

SalePepeCumino wrote: It would be also amazing if I could click my hotkeys without moving the mouse to the position of the click. Is it possible to do?
If ControlClick works, it won't move the mouse. Another approach is to have the script record the current mouse coordinates using MouseGetPos, then after it clicks, move the mouse back using MouseMove.
SalePepeCumino
Posts: 11
Joined: 13 Nov 2020, 09:47

Re: Poker

19 Nov 2020, 04:09

boiler wrote:
18 Nov 2020, 16:20
SalePepeCumino wrote: But when I use Hotkeys F1, F2, F3 and Mbutton, I would like to use them ALSO when the window under my mouse position is not activated.
...For the first problem I think I could use "MouseGetPos" but I didn't understand how setting up it.
Yes, MouseGetPos does help you do that. You can have it activate the window under the mouse when you press the hotkey:

Code: Select all

F1::
	MouseGetPos,,, WinID
	WinActivate, ahk_id %WinID%
	; your other code here
return
If you don't want it to activate the window at all, then you have to use ControlSend and ControlClick to send to the window you've identified as being under the mouse without activating it. This doesn't work for all windows, but you can try it.

SalePepeCumino wrote: It would be also amazing if I could click my hotkeys without moving the mouse to the position of the click. Is it possible to do?
If ControlClick works, it won't move the mouse. Another approach is to have the script record the current mouse coordinates using MouseGetPos, then after it clicks, move the mouse back using MouseMove.
Thank you so much for your Answer. ControlSend and ControlClick unfortunately doesn't work at all, but MouseGetPos as you write works perfectly. Today I will try to set up MouseGetPos+currentcoord+MouseMove and I hope it will help me

Return to “Gaming”

Who is online

Users browsing this forum: Lord-9621, Spy_360 and 13 guests