PDA

View Full Version : Autohotkey for second monitor


mattw
09-26-2005, 05:48 AM
First, I searched and got plenty of hits but nothing specific to my question. I have recently began using the script by illuniuos and find it a wonderful finger/wrist saver. Here. (http://www.onlinepokerfaq.com/guide/mouseless-poker.html) My problem is I have two monitors and would like the script to work on both.

Would someone be so kind as to write a patch for the script and post it so that all I need to do is c & p it into the original. Please state where it should be placed in the original.

TIA

X-posted from computer tech help.

Wrecker
09-26-2005, 06:43 AM
[ QUOTE ]
First, I searched and got plenty of hits but nothing specific to my question. I have recently began using the script by illuniuos and find it a wonderful finger/wrist saver. Here. (http://www.onlinepokerfaq.com/guide/mouseless-poker.html) My problem is I have two monitors and would like the script to work on both.

Would someone be so kind as to write a patch for the script and post it so that all I need to do is c & p it into the original. Please state where it should be placed in the original.

TIA

X-posted from computer tech help.

[/ QUOTE ]

Per your request.
NOTE: I'm assuming both of your monitors are 1600 - 1200 rez.
To navigate to the second monitor use the same keypad numbers as for the first monitor but press and hold the ALT key. Enjoy.
Post this code immediately below the code which follows this section.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Define keys for absolute mouse motion to a particular window.
; For example, "Numpad7" always goes to the upper-left window.
; This does not depend on where the mouse starts.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;


; Code for monitor #2
; WindowNW
!Numpad7::
CoordMode, Mouse, Screen
MouseMove,2000,300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowNE
!Numpad9::
CoordMode, Mouse, Screen
MouseMove,2800,300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowSW
!Numpad1::
CoordMode, Mouse, Screen
MouseMove,2050,900
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowSE
!Numpad3::
CoordMode, Mouse, Screen
MouseMove,2850,900
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

mattw
09-26-2005, 07:08 AM
thanks wrecker. yes, both monitors are 16x12. will give it a try and get back to ya.

mattw
09-26-2005, 07:22 AM
you the man wrecker. it worked. what about the action commands for the second monitor? heres the original:

; Fold
F1::
;MouseClick, left, 240, 474
;Sleep, 100
MouseClick, left, 240, 474
Sleep, 100
return

; Check/Call
F2::
;MouseClick, left, 385, 474
;Sleep, 100
MouseClick, left, 385, 474
Sleep, 100
return

; Bet/Raise
F3::
;MouseClick, left, 550, 474
;Sleep, 100
MouseClick, left, 550, 474
Sleep, 100
return

; AutoPost
F4::
MouseClick, left, 14, 533
Sleep, 100
return

; SitOut
F5::
MouseClick, left, 14, 568
Sleep, 100
return

Wrecker
09-26-2005, 07:46 AM
[ QUOTE ]
you the man wrecker. it worked. what about the action commands for the second monitor? heres the original:

; Fold
F1::
;MouseClick, left, 240, 474
;Sleep, 100
MouseClick, left, 240, 474
Sleep, 100
return

; Check/Call
F2::
;MouseClick, left, 385, 474
;Sleep, 100
MouseClick, left, 385, 474
Sleep, 100
return

; Bet/Raise
F3::
;MouseClick, left, 550, 474
;Sleep, 100
MouseClick, left, 550, 474
Sleep, 100
return

; AutoPost
F4::
MouseClick, left, 14, 533
Sleep, 100
return

; SitOut
F5::
MouseClick, left, 14, 568
Sleep, 100
return

[/ QUOTE ]

I use the keypad #'s 4 5 6(No ALT Key) for Fold Check/Call Bet/Raise respectively for both monitors. Also numpad "+" for AutoPost and numpad "-" for SitOut. Just replace the current Define Keys section with this.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Define keys for fold, check/call, and bet/raise
;
; The key for each action is defined by the string before the double colon.
; You can change the key like this:
; Regular keys: a, b, c, 1, 2, 3, etc.
; Function keys: F1, F2, etc.
; Numeric keypad: Numpad1, Numpad2, NumpadPlus, etc
; Arrows keys: Left, Right, Up, Down
; Control key prefix: add caret in front, like this: ^f, ^c, ^r
; Alt key prefix: add exclamantion point in front: !f, !c, !r
; Windows key prefix: add hash mark in front: #f, #c, #r

; Fold
Numpad4::
;MouseClick, left, 240, 474
;Sleep, 100
MouseClick, left, 240, 474
Sleep, 100
return

; Check/Call
Numpad5::
;MouseClick, left, 385, 474
;Sleep, 100
MouseClick, left, 385, 474
Sleep, 100
return

; Bet/Raise
Numpad6::
;MouseClick, left, 550, 474
;Sleep, 100
MouseClick, left, 550, 474
Sleep, 100
return

; AutoPost
NumpadAdd::
MouseClick, left, 14, 533
Sleep, 100
return

; SitOut
NumpadSub::
MouseClick, left, 14, 568
Sleep, 100
return

mattw
09-26-2005, 08:44 AM
now im alittle confused. i got the mouse to go to the second monitor. i inserted the second monitor syntax to the action buttons and get an error message saying double syntax something or other. how do you use the same action keystrokes for the different monitors? im using the function keys for the actions as i have already miskeyed and called a $10 raise with TT /images/graemlins/confused.gif

Wrecker
09-26-2005, 08:58 AM
[ QUOTE ]
now im alittle confused. i got the mouse to go to the second monitor. i inserted the second monitor syntax to the action buttons and get an error message saying double syntax something or other. how do you use the same action keystrokes for the different monitors? im using the function keys for the actions as i have already miskeyed and called a $10 raise with TT /images/graemlins/confused.gif

[/ QUOTE ]

The section of code I posted is meant to replace the code that is already in the section of your copy, so be sure to delete the old section of code. The code I posted replaces your function keys with the number pad 4,5,6,-,+ keys respectively. I like using one hand for as many functions as possible. I hope this answers your question.

Here is the complete script I use and it works for me. If all else fails kill your copy and replace the entire script with this.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Party Poker Keyboard Shortcuts
;
; Distributed the Online Poker FAQ
; See http://www.onlinepokerfaq.com/guide/mouseless-poker.html
;
; Based on an original script by "illunious" at 2+2, posted 8/18/2004.


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Define keys for fold, check/call, and bet/raise
;
; The key for each action is defined by the string before the double colon.
; You can change the key like this:
; Regular keys: a, b, c, 1, 2, 3, etc.
; Function keys: F1, F2, etc.
; Numeric keypad: Numpad1, Numpad2, NumpadPlus, etc
; Arrows keys: Left, Right, Up, Down
; Control key prefix: add caret in front, like this: ^f, ^c, ^r
; Alt key prefix: add exclamantion point in front: !f, !c, !r
; Windows key prefix: add hash mark in front: #f, #c, #r

; Fold
Numpad4::
;MouseClick, left, 240, 474
;Sleep, 100
MouseClick, left, 240, 474
Sleep, 100
return

; Check/Call
Numpad5::
;MouseClick, left, 385, 474
;Sleep, 100
MouseClick, left, 385, 474
Sleep, 100
return

; Bet/Raise
Numpad6::
;MouseClick, left, 550, 474
;Sleep, 100
MouseClick, left, 550, 474
Sleep, 100
return

; AutoPost
NumpadAdd::
MouseClick, left, 14, 533
Sleep, 100
return

; SitOut
NumpadSub::
MouseClick, left, 14, 568
Sleep, 100
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Define keys for relative motion to the right, to the left, etc.
; For example, "Right" goes one window to the right.
; This depends on where the mouse starts.

; WindowLeft
^Left::
CoordMode, Mouse, Relative
MouseMove,-400,300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowDown
^Down::
CoordMode, Mouse, Relative
MouseMove,400,900
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowRight
^Right::
CoordMode, Mouse, Relative
MouseMove,1200,300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowUp
^Up::
CoordMode, Mouse, Relative
MouseMove,400,-300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Define keys for absolute mouse motion to a particular window.
; For example, "Numpad7" always goes to the upper-left window.
; This does not depend on where the mouse starts.

; WindowNW
Numpad7::
CoordMode, Mouse, Screen
MouseMove,400,300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowNE
Numpad9::
CoordMode, Mouse, Screen
MouseMove,1200,300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowSW
Numpad1::
CoordMode, Mouse, Screen
MouseMove,450,900
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowSE
Numpad3::
CoordMode, Mouse, Screen
MouseMove,1250,900
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Code for monitor #2
; WindowNW
!Numpad7::
CoordMode, Mouse, Screen
MouseMove,2000,300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowNE
!Numpad9::
CoordMode, Mouse, Screen
MouseMove,2800,300
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowSW
!Numpad1::
CoordMode, Mouse, Screen
MouseMove,2050,900
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; WindowSE
!Numpad3::
CoordMode, Mouse, Screen
MouseMove,2850,900
MouseGetPos, curPosX, curPosY, curWin
WinGetTitle, title, ahk_id %curWin%
WinActivate, %title%
return

; Suspend to use the numberpad for usual input

!Home::
Suspend ; Press Alt+Home to suspend, and Alt+Home again to resume

mattw
09-26-2005, 09:30 AM
thanks again wrecker for the help. i did as you suggested and copied your script. again, my mouse moves to the second monitor but the action buttons only work on the first monitor. crap, im clueless.

Wrecker
09-26-2005, 09:50 AM
[ QUOTE ]
thanks again wrecker for the help. i did as you suggested and copied your script. again, my mouse moves to the second monitor but the action buttons only work on the first monitor. crap, im clueless.

[/ QUOTE ]

Sorry your having trouble. Check it out with all eight positions of your monitors occupied with a game table. Be sure the tables are in the corners of each monitor. There doe's appear to be a problem when you try to navigate to an unoccupied game position. Also if you have other non game related windows opened this will confuse the script and it will navigate to that window sometimes instead of a game window.

mattw
09-26-2005, 09:57 AM
okay. will take your recent advise into action. i have been testing the script on blank screens and all appears to work except the action buttons on the second monitor. gotta get some sleep now. will respond afterwards.

mowz
09-26-2005, 07:20 PM
If that doesn't work out for you, consider a trackball. I just got the Expert Mouse trackball a few weeks ago. It cost $100 but my constant wrist pain disappeared a few days after I got it. It took me about two hours to be comfortable using it to play poker, and I just left my normal mouse plugged in for playing games. I'm loving it.

mattw
09-27-2005, 01:18 AM
PSA:

problem solved. 8 tables with hotkeys. heaven on earth. thanks to all who contributed.

tc
matt