Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2007, 02:53 PM
Suerte Suerte is offline
Senior Member
 
Join Date: Oct 2006
Posts: 131
Default Dearest AHK masters

I am creating a simple ahk script to remap the four keyboard functions that WPEX just intorducded on there software. I used ahk, for instance, to make XButton1 perform the same action as down arrow key, if #IfWinActive, ahk_class TDlgTableHoldem.

First off, I have tweak UI installed and running properly.

So far, the script works well. There is one problem I see though. Indeed it only performs the specified action on the active table, however, when I move my mouse cursor from the active table to the desktop or toolbar, it continues to leave the last table I was at active. It only leaves the table active if my cursor is moved directly into a "non window". Therefor, when I left click the desktop for instance, it performs "fold" on the last table, even though my mouse cursor is NOT over the table.

In short, I want the ahk to only perform the action ONLY if the mouse cursor is over the table. How do I do it? Thanks in advance!!

Here is my script.

#IfWinActive, ahk_class TDlgTableHoldem
RButton::Left
Reply With Quote
  #2  
Old 01-18-2007, 07:52 PM
illunious illunious is offline
Senior Member
 
Join Date: Oct 2003
Posts: 1,992
Default Re: Dearest AHK masters

Maybe use MouseGetPos (CoordMode, Mouse, Screen) and WinGetPos, and check that the mouse X and Y are in the window area.

There could be an easier way though....
Reply With Quote
  #3  
Old 01-18-2007, 07:55 PM
jukofyork jukofyork is offline
Senior Member
 
Join Date: Sep 2004
Location: Leeds, UK.
Posts: 2,551
Default Re: Dearest AHK masters

[ QUOTE ]
I am creating a simple ahk script to remap the four keyboard functions that WPEX just intorducded on there software. I used ahk, for instance, to make XButton1 perform the same action as down arrow key, if #IfWinActive, ahk_class TDlgTableHoldem.

First off, I have tweak UI installed and running properly.

So far, the script works well. There is one problem I see though. Indeed it only performs the specified action on the active table, however, when I move my mouse cursor from the active table to the desktop or toolbar, it continues to leave the last table I was at active. It only leaves the table active if my cursor is moved directly into a "non window". Therefor, when I left click the desktop for instance, it performs "fold" on the last table, even though my mouse cursor is NOT over the table.

In short, I want the ahk to only perform the action ONLY if the mouse cursor is over the table. How do I do it? Thanks in advance!!

Here is my script.

#IfWinActive, ahk_class TDlgTableHoldem
RButton::Left

[/ QUOTE ]

<font class="small">Code:</font><hr /><pre>~RButton::
Fold(getid())
return

getid()
{
id := ""
MouseGetPos, , , id
return id
}

Fold(id)
{
IfWinExist, ahk_id%id%
{
WinActivate, ahk_id%id%
WinWaitActive, ahk_id%id%, , 1
If (errorlevel&lt;&gt;1)
{
Send, {LEFT}
}
}
}</pre><hr />
I'm no expert with AHK, but these snippets taken from dave's BetPot script should do what you want I think (ie: send a Left arrow to the window below the mouse cursor).

Juk [img]/images/graemlins/smile.gif[/img]
Reply With Quote
  #4  
Old 01-19-2007, 03:34 PM
jukofyork jukofyork is offline
Senior Member
 
Join Date: Sep 2004
Location: Leeds, UK.
Posts: 2,551
Default Re: Dearest AHK masters

[ QUOTE ]
[ QUOTE ]
I am creating a simple ahk script to remap the four keyboard functions that WPEX just intorducded on there software. I used ahk, for instance, to make XButton1 perform the same action as down arrow key, if #IfWinActive, ahk_class TDlgTableHoldem.

First off, I have tweak UI installed and running properly.

So far, the script works well. There is one problem I see though. Indeed it only performs the specified action on the active table, however, when I move my mouse cursor from the active table to the desktop or toolbar, it continues to leave the last table I was at active. It only leaves the table active if my cursor is moved directly into a "non window". Therefor, when I left click the desktop for instance, it performs "fold" on the last table, even though my mouse cursor is NOT over the table.

In short, I want the ahk to only perform the action ONLY if the mouse cursor is over the table. How do I do it? Thanks in advance!!

Here is my script.

#IfWinActive, ahk_class TDlgTableHoldem
RButton::Left

[/ QUOTE ]

<font class="small">Code:</font><hr /><pre>~RButton::
Fold(getid())
return

getid()
{
id := ""
MouseGetPos, , , id
return id
}

Fold(id)
{
IfWinExist, ahk_id%id%
{
WinActivate, ahk_id%id%
WinWaitActive, ahk_id%id%, , 1
If (errorlevel&lt;&gt;1)
{
Send, {LEFT}
}
}
}</pre><hr />
I'm no expert with AHK, but these snippets taken from dave's BetPot script should do what you want I think (ie: send a Left arrow to the window below the mouse cursor).

[/ QUOTE ]
Did this work ok?

Juk [img]/images/graemlins/smile.gif[/img]
Reply With Quote
  #5  
Old 01-19-2007, 11:43 PM
Suerte Suerte is offline
Senior Member
 
Join Date: Oct 2006
Posts: 131
Default Re: Dearest AHK masters

Juk- Sorry for the delay... I live in US and am trying to get the payment situation figured out. Ugh!

Your script (or dave's) worked perfectly, thank you! I am trying to figure out what all that stuff means, but I seem to be having trouble remapping the other keys to perform like this one.

If you have a chance, can you duplicate that into another piece that makes the WheelUp work the same as the Right arrow key? Then I can see what I should be replacing. Thanks again Juk! [img]/images/graemlins/smile.gif[/img]
Reply With Quote
  #6  
Old 01-20-2007, 01:56 AM
jukofyork jukofyork is offline
Senior Member
 
Join Date: Sep 2004
Location: Leeds, UK.
Posts: 2,551
Default Re: Dearest AHK masters

[ QUOTE ]
Juk- Sorry for the delay... I live in US and am trying to get the payment situation figured out. Ugh!

Your script (or dave's) worked perfectly, thank you! I am trying to figure out what all that stuff means, but I seem to be having trouble remapping the other keys to perform like this one.

If you have a chance, can you duplicate that into another piece that makes the WheelUp work the same as the Right arrow key? Then I can see what I should be replacing. Thanks again Juk! [img]/images/graemlins/smile.gif[/img]

[/ QUOTE ]
I think all you need it this:

~WheelUp::Right
~WheelDown::Left

Juk [img]/images/graemlins/smile.gif[/img]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.