Open Side Menu Go to the Top
Register
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER!

10-14-2010 , 12:43 PM
Also found not to use AutoHotkey_L download but only the Basic Installer
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
10-16-2010 , 06:51 PM
I uninstalled pokershortcuts.. if someone wants to go through everything with me on skype on how to set it up, i'll pay for your help.

major things i need.
bb indicator
betting
table control?
handling automatic popups


pm me.
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-01-2010 , 05:39 PM
I have had TableNinjaFT for about a month now. My free trial is about to run out, so I tried to get PokerShortcuts working for me. I could not get PSC working and I will probally just end up buying TNFT.

One of the features that PSC has over TNFT is the ability to display an on screen display that gives # of players left, # of BB, tiime left at level, blind level, etc... This tool is very helpful for SNG Multitablers.

I would thank that if someone could get just this aspect of PSC working as an AHK they could make a few bucks from SNG grinders. I dont know much about AHK or programming but here is the AHK text from PSC to look at. Is it even possible to create a separate AHK script for just the OSD? would it take alot of work? I would do it myself if I knew how.

Any input would be appreaciated.



/*
* Copyright (C) 2007, 2008, 2009 Windy Hill Technology LLC
*
* This file is part of Poker Shortcuts.
*
* Poker Shortcuts is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Poker Shortcuts is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FT Table Opener. If not, see <http://www.gnu.org/licenses/>.
*
* Project Home: http://code.google.com/p/pokershortcuts/
*/


; display the chat warning message IF
; a table is active
; and mouse is not in chat area
; and chat display enabled
;


DisplayChatWarning()
{
global ;ControlsEnabled
local vPosX, vPosY, CasinoName, ClientScaleFactor


WinId := WinActive("A")
IfWinNotActive, ahk_id%WinId% ahk_group Tables
return


if NOT (CasinoName := CasinoName(WinId,A_ThisFunc))
return


; check if the mouse is in chat box
if (TableIsMouseInChat())
{


; erase the tooltip
Tooltip,,,,8
; if the controls are enabled, then we need to disable them while in chat box
if (ControlsEnabled)
SettingsUpdateHotkeys(0)
; set the mouse to have focus in the ChatEdit box
ControlFocus, %CasinoName%%BoxChatEditControlName%,ahk_id%WinId%
}
; else the mouse is not in chat
else
{
if ChatWarningEnabled
{
vPosX := %CasinoName%EditChatBoxX
vPosY := %CasinoName%EditChatBoxY
WindowScaledPos(vPosX, vPosY, ClientScaleFactor, "Screen", WinId)

;outputdebug, %vPosX% %vPosY%
CoordMode, Tooltip, Screen
Tooltip, Move Mouse Below to Chat, vPosX, vPosY, 8
}
; if the controls are not enabled, then we need to enable them, since we
; are out of the chat box
if (NOT ControlsEnabled)
SettingsUpdateHotkeys(1)
}
}



; display OSD that require the pot size to be read
DisplayOsd1(WinId)
{
global
; these local vars do not need to be declared, since there is a specific global var declared
local Flag, Bet, BetDiPot, PotBet, X, Y, Text, OsdFontSize, Bold, Italic, Theme, TableType, PendingTableStartTime
local Stack, M, EM, NumBB, FoldButtonVisibleFlag, PotOdds, CasinoName
local PotDivCall, DisplayPot, DisplayCall ; create local vars for these
local ClientScaleFactor, TableRingOrTournament

static Osd1LastText := ""
static Osd1LastPosX := ""
static Osd1LastPosY := ""
static Osd1LastTheme := ""

if NOT (CasinoName := CasinoName(WinId,A_ThisFunc))
return

TableType := TableType(WinId)

; display the OSD if
; the displays are enabled
; and this is not a limit game OR the display is enabled for limit games
; else return
if (NOT((OsdBettingInfoEnabled) AND ((TableType <> "Limit") OR DisplayOsdBetInfoInLimitGamesEnabled)))
return


; get the current table's pending start time,
; if it is in the pending table list (so we can display the elapsed time since the fold button appeared in the display routines below)
Position := ListGetPos(TableIDPendingList,WinId)
if Position
PendingTableStartTime := Round(((A_TickCount - ListGetItem(TableIDPendingTimeList,Position))/1000),0)
else
PendingTableStartTime := "--"




; if action is pending, then show display
if (TablePendingAction(WinId))
{

Bet := "--"
BetDivPot := "--"
PotBet := "--"
PotOdds := "--"

; this needs to be the SAFE version, because this display could be enabled, and
; the user could hit the fold button right away and cause a crash
; get the current pot size and other vars

BetVariables(WinId)

; added in ver 4.0014
; put in a check for the Pot == 0, if so then re-read the bet variables
if (Pot == 0)
{
UpdateBettingVarsFlag := 1 ; so that we will actually try to read the bet vars again
BetVariables(WinId)
}

if (Pot > 0)
{
DisplayPot := Pot
Call := Call
}

else
{
DisplayPot := "--"
Call := "--"
PotDivCall := "--"
}

; get the bet amount IF the bet edit window is visible
;if ControlVisible("BoxBetEdit",WinId)
Bet := BetAmountGet(WinId)
if (Bet == 0)
Bet := "--"


;outputdebug, in osd1 Bet: %Bet% Call:%Call% Pot:%DisplayPot% potodds:%PotDivCall%



; PotPlusCall is the amount in the pot + the amount for the hero to call (if any)
; BetDivPot is the % of pot bet or pot raise that the current bet amount represents
; PotBet is the amount to bet (or raise to) to make a pot size bet (or raise)


if ((Pot > 0) AND (Bet <> "--"))
{
BetDivPot := Round(((Bet-Call)/(Pot+Call))*100,0)
PotBet := Pot
if (Mod(PotBet*100,100) == 0)
PotBet := Round(PotBet,0)

if (Call > 0)
PotOdds := Round(Pot / Call,1)
}



; we don't want the possibility of calling the osdEx() function, and getting interrupted in the middle of it, so we'll turn critical on here
; this function could get called from by several independent places in the code (timer1 and betmodify() for example).
; osdEx() sometime causes AHK to spit out an error message "The same variable cannot be used for more than one control"
Critical, On


; get the text to be displayed from the main program GUI
Text := OsdBettingInfoText

; see if there are any option strings
Italic := iif( InStr(Text, "!2"), "italic", "" )
Bold := iif( InStr(Text, "!3"), "bold", "" )
; remove any option strings from the text
StringReplace, Text, Text,!2,,All
StringReplace, Text, Text,!3,,All


; substitute in any variables




StringReplace, Text, Text,!r,`n,All
StringReplace, Text, Text,!!,!,All

StringReplace, Text, Text,!b,% BigBlind%WinId%,All
StringReplace, Text, Text,!s,% SmallBlind%WinId%,All
StringReplace, Text, Text,!a,% Ante%WinId%,All

StringReplace, Text, Text,!x,%Bet%,All
StringReplace, Text, Text,!y,%BetDivPot%,All
StringReplace, Text, Text,!z,%PotBet%,All
StringReplace, Text, Text,!t,%PendingTableStartTime%,All

StringReplace, Text, Text,!c,%Call%,All
StringReplace, Text, Text,!p,%DisplayPot%,All
StringReplace, Text, Text,!d,%PotOdds%,All

TableRingOrTournament := TableRingOrTournament(WinId)
if TableRingOrTournament
StringReplace, Text, Text,!q,% "DM:" . DealMeModeState%WinId%,All
else
StringReplace, Text, Text,!q,,All

; if there are any double next lines, remove one of them
StringReplace, Text, Text,`n`n,`n,All


; get the scaled screen position of the position coordinates
X := %CasinoName%OsdBettingInfoPosX
Y := %CasinoName%OsdBettingInfoPosY

; we are placing the X,Y relative to the window
WindowScaledPos(X, Y, ClientScaleFactor, "Screen", WinId)

OsdFontSize := Round(OsdBettingInfoFontSize * ClientScaleFactor)

Theme = c%OsdBettingInfoColor% s%OsdFontSize% %Bold% %Italic% ; size, color, bold/italic

; set flag if the GUI does not exist
Gui 97:+LastFoundExist
IfWinNotExist
Flag := 1

; display the gui if it did not exist, or if it is differnt from last time
if (Flag OR (Text <> Osd1LastText) OR (Osd1LastPosX <> X) OR (Osd1LastPosY <> Y) OR (Osd1LastTheme <> Theme))
{
;outputdebug, refresh osd1 GuiNum:97
; erase the OSD in case the width has changed from last time
osdEx("","","",0,0,97)

; this appears to be a slow command... so we only display it if it has changed of it doesn't exist
osdEx( Text, Theme, OsdBettingInfoFont, X, Y,97) ;osdEx(msg="", options="", font="", x=0, y=0, gui=98)
; save the text so that we know if it has changed or not
Osd1LastText := Text
Osd1LastPosX := X
Osd1LastPosY := Y
Osd1LastTheme := Theme
}


}

; else the fold button is gone, so erase the bet info
else
{
; erase the tooltip and OSDs
osdEx("","","",0,0,97)

}



}





; ----------------------------------------------------------------------------------------------------------------------




; return the next available gui num for the Osd3, that is not already in the GuiNumList
; returns 0 if we are already greater than MaxDisplayOsd3GuiNum constant... just so that we don't issue too many Guis
; this uses the guinums from 1-42 (max of 32)
; we put the numbers 1-32 in the list, but they are really offset to 1-32 (when used in the functions that use them as a guinum)
; the offset value is StartingDisplayOsd3GuiNumMinus1
; THIS FUNCTION MUST BE CALLED WITH Critical, on already in effect !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DisplayOsd3GuiNumNext()
{
global ; GuiNumList
local ListLength, NextN, OffsetIndex
;outputdebug, guinumnext
; I added the critical on in all of the GuiHighlighter functions, so it isn't necessary in here
;Critical, On ; since this function could be called by multiple time... need to make it uninterruptable


; get the length of the used Osd3 gui numbers
ListLength := ListLength(Osd3GuiNumList)

; if the list length is 0, then the first available number is 1
if NOT ListLength
{
NextN := StartingDisplayOsd3GuiNumMinus1 + 1
}
; else we will find the next available number
else
{
; loop thru the all the existing numbersnumbers and get the next available number

loop, %ListLength%
{

OffsetIndex := A_index + StartingDisplayOsd3GuiNumMinus1

; see if the index number is available
if ListGetPos(Osd3GuiNumList,OffsetIndex)
continue
else
{
; this index number is available
NextN := OffsetIndex
break
}
}
; if there were no holes available, take the next one
if NOT NextN
{
NextN := OffsetIndex + 1
}
if NextN > StartingDisplayOsd3GuiNumMinus1 + MaxDisplayOsd3GuiNum
NextN := 0
}
; add the next used gui number to the used list, as long as it is not 0 (no number available case)
; Plus add in the starting offset for our particular GUINUM
if NextN
{
ListAddItem(Osd3GuiNumList,NextN)
}
;outputdebug, NEW Osd3 number issued = %NextN%
;Critical Off

return NextN
}



; destroy the Osd3 display on Table WinId
; THIS FUNCTION MUST BE CALLED WITH Critical, on already activated
;
DisplayOsd3Off(WinId)
{
global
local GuiNum, Position ;, GuiId

; so that we don't end up with partial highlighters showing (since TimerFast might interrupt), use critical
;Critical, On

; if display is already off, then return
if NOT Osd3GuiNum%WinId%
{
;Critical, Off
return
}

; get the GuiNum for this highlighter
GuiNum := Osd3GuiNum%WinId%

; erase the GuiNum for this table
Osd3GuiNum%WinId% =

; erase the last x position, just so that we are sure something will be changed when we re-display this OSD
Osd3LastPosX%WinId% =


; kill this highlighter
Gui %GuiNum%: destroy

; remove this GuiNum from the active list
ListDelItem(Osd3GuiNumList,GuiNum)


;outputdebug, OSD3 off %GuiNum%

;Critical, Off
}





DisplayOsd3(WinId)
{
global
local Flag, X, Y, ClientScaleFactor, Text, OsdFontSize, Theme, TableRingOrTournament, WindowIsOverlayedFlag
local Stack, NumPlayers, NumBB, M, EM, NumTBB, PendingTableStartTime
local Bold, Italic
local TableActiveFlag, Position, Position1, Position2, GuiNum
local CasinoName
local Index, Levels, Parameter, Array, DisplayColor, HeroSeatedFlag
; we have some arrays... Level Color Array ; if we remove the Critical On, then we should define every possible array element here... now they are global


;outputdebug, in Osd3 WinId:%WinId%

;DllCall("QueryPerformanceFrequency", "Int64 *", TimerFrequency)
;DllCall("QueryPerformanceCounter", "Int64 *", TimerBefore)


if NOT (CasinoName := CasinoName(WinId,A_ThisFunc))
return






TableRingOrTournament := TableRingOrTournament(WinId)

; check if WinId is the active table
IfWinActive, ahk_group Tables ahk_id%WinId%
TableActiveFlag := 1
else
TableActiveFlag := 0

; check if hero is seated or not
HeroSeatedFlag := HeroSeated(WinId)

; get the scaled screen position of the position coordinates
X := %CasinoName%DisplayOsd3PosX
Y := %CasinoName%DisplayOsd3PosY
WindowScaledPos(X, Y, ClientScaleFactor, "Screen", WinId)

; WindowIsOverlayedFlag := WindowIsOverlayedAtXY(X,Y,WinId)
WindowIsOverlayedFlag := WindowIsOverlayed(WinId)



; so that we don't end up with partial gui number confusion, use critical on.... need this because we could call this from 2 different timers with different
; priorities, and if we get interrupted in the middle of one, the LISTs could be messed up.
; I think that we need critical on here too, because below we have some arrays are used that should be defined locally, but can't do that in AHK... arrays are Array, Level Color
Critical, On

;outputdebug, %WinId% activetable:%TableActiveFlag% HeroSeated=%HeroSeatedFlag%
;outputdebug, DisplayOsd3Enabled=%DisplayOsd3Enabled%
;outputdebug, TableActiveFlag=%TableActiveFlag%
;outputdebug, DisplayOsd3AllTablesEnabled=%DisplayOsd3AllTablesE nabled%
;outputdebug, TableRingOrTournament=%TableRingOrTournament%
;outputdebug, DisplayOsdStackInfoInRingGamesEnabled=%DisplayOsdS tackInfoInRingGamesEnabled%
;outputdebug, HeroSeated=%HeroSeatedFlag%


; display the Osd3 info on this table
; if
; DisplayOsd3Enabled
; and mouse button not held down
; and (TableActiveFlag OR (!TableActiveFlag AND DisplayOsd3AllTablesEnabled))
; and hero is seated
; and ((NOT TableRingOrTournament) OR DisplayOsdStackInfoInRingGamesEnabled)
; and window is not overlayed
if ( DisplayOsd3Enabled

AND (TableActiveFlag OR (!TableActiveFlag AND DisplayOsd3AllTablesEnabled))
AND (HeroSeatedFlag == 1)
AND ((NOT TableRingOrTournament) OR DisplayOsdStackInfoInRingGamesEnabled)
AND (NOT WindowIsOverlayedFlag) )
{

; AND (!(GetKeyState("LButton", "P") OR GetKeyState("RButton", "P")) )

; get all of the current information for this table

; get the scaled screen position of the position coordinates
; X := %CasinoName%DisplayOsd3PosX
; Y := %CasinoName%DisplayOsd3PosY
; WindowScaledPos(X, Y, ClientScaleFactor, "Screen", WinId)

; get the number of players at this table, but only if we actually need this parameter
if (instr(DisplayOsd3Text,"!m") OR instr(DisplayOsd3Text,"!p") OR instr(DisplayOsd3Text,"!e") OR instr(DisplayOsd3Text,"!o"))
NumPlayers := TablePlayers(WinId)
else
NumPlayers := 1

; get the blinds and Antes (into global vars)
TableBlinds(WinId)

; get the hero's stack size, but only if it is needed
if (instr(DisplayOsd3Text,"!$") OR instr(DisplayOsd3Text,"!n") OR instr(DisplayOsd3Text,"!m") OR instr(DisplayOsd3Text,"!e") OR instr(DisplayOsd3Text,"!o"))
Stack := HeroStack(WinId)
else
Stack := 0

;Stack # size if found
;S if sitting out
;A if All In
;"" if not found

; if the stack digits blank out, then just use the last stack value
if ((Stack == "") OR (Stack == "S"))
Stack := Osd3LastStack%WinId%

if (Stack == "A")
Stack := 0

; save the last stack size for next time thru this function
Osd3LastStack%WinId% := Stack

; get this table's pending start time,
; if it is in the pending table list (so we can display the time in the display routines below)
Position1 := ListGetPos(TableIDPendingList,WinId)
if Position1
PendingTableStartTime := Round(((A_TickCount - ListGetItem(TableIDPendingTimeList,Position1))/1000),0)
else
PendingTableStartTime := "0"





; calculate #BB and ~M, and round them off
NumBB := Stack / BigBlind%WinId%
if NumBB >= 10
NumBB := Round(NumBB,0)
else
NumBB := Round(NumBB,1)

; calculate Harrington's M value
M := Stack / (BigBlind%WinId% + SmallBlind%WinId% + Ante%WinId% * NumPlayers)
if M >= 10
M := Round(M,0)
else
M := Round(M,1)

; calculate Harrington's effective M
EM := (Stack / (BigBlind%WinId% + SmallBlind%WinId% + Ante%WinId% * NumPlayers)) * (NumPlayers / 10)
if EM >= 10
EM := Round(EM,0)
else
EM := Round(EM,1)

; calculate tBB i.e. True BB as discussed in http://forumserver.twoplustwo.com/sh...97&page=0&vc=1
; you add BB plus 2/3 of the antes
NumTBB := Stack / (BigBlind%WinId% + Ante%WinId% * NumPlayers * 2 / 3)
if NumTBB >= 10
NumTBB := Round(NumTBB,0)
else
NumTBB := Round(NumTBB,1)



; break the Osd3 color string into an array
StringSplit,Array,DisplayOsd3Color,`,

;outputdebug, %Array0% %Array1% %Array2% %Array3% %Array4%

; if the array only has one element, then it must be a solid color, independent of any parameters
if (Array0 <= 1)
DisplayColor := DisplayOsd3Color
; else the user must have entered a selection of colors and levels to change the color at.
else
{
; find out how many "less than or equal to levels we have"
Levels := ((Array0) / 2) - 1
; assign the levels and colors from the color array
Index := 1 ; index pointer into the array (1 points to the criteria, e.g. !b )
Loop, % Levels
{
Index++
Level%a_index% := Array%Index%
Index++
Color%a_index% := Array%Index%
}
; get the upper color (default) if the value is above all other levels, the last color in the string (or array)
Index++
ColorDefault := Array%Index%
;outputdebug, ColorDefault=%ColorDefault%
; get the value of the parameter we are checking for
if (Array1 == "!n")
Parameter := NumBB
else if (Array1 == "!m")
Parameter := M
else if (Array1 == "!p")
Parameter := NumPlayers
else if (Array1 == "!$")
Parameter := Stack
else if (Array1 == "!e")
Parameter := EM
else if (Array1 == "!o")
Parameter := NumTBB
else if (Array1 == "!b")
Parameter := BigBlind%WinId%
else if (Array1 == "!t")
Parameter := PendingTableStartTime
;outputdebug, Parameter=%Parameter%

; loop thru the levels to determine the color
DisplayColor := ColorDefault ; set the default color, in case we don't get a match in any of the levels
loop, % Levels
{
if (Parameter <= Level%a_index%)
{
DisplayColor := Color%a_index%
break
}
}
}

;outputdebug, DisplayColor=%DisplayColor%

OsdFontSize := Round(DisplayOsd3FontSize * ClientScaleFactor)

Text := DisplayOsd3Text
; make sure there are no "|" characters in here, as this is our delimeter, remove them all
StringReplace, Text, Text,|,,All

; see if there are any option strings
Italic := iif( InStr(Text, "!2"), "italic", "" )
Bold := iif( InStr(Text, "!3"), "bold", "" )
; remove any option strings from the text
StringReplace, Text, Text,!2,,All
StringReplace, Text, Text,!3,,All

StringReplace, Text, Text,!r,`n,All
StringReplace, Text, Text,!!,!,All

StringReplace, Text, Text,!b,% BigBlind%WinId%,All
StringReplace, Text, Text,!s,% SmallBlind%WinId%,All
StringReplace, Text, Text,!a,% Ante%WinId%,All

StringReplace, Text, Text,!$,%Stack%,All
StringReplace, Text, Text,!m,%M%,All
StringReplace, Text, Text,!n,%NumBB%,All
StringReplace, Text, Text,!e,%EM%,All
StringReplace, Text, Text,!p,%NumPlayers%,All

StringReplace, Text, Text,!t,%PendingTableStartTime%,All

StringReplace, Text, Text,!o,%NumTBB%,All

if TableRingOrTournament
StringReplace, Text, Text,!q,% "DM:" . DealMeModeState%WinId%,All
else
StringReplace, Text, Text,!q,,All

; if there are any double next lines, remove one of them
StringReplace, Text, Text,`n`n,`n,All

Theme = c%DisplayColor% s%OsdFontSize% %Bold% %Italic% ; size, color, bold/italic

; get the class name of the process at XY
; if it is not AutoHotkeyGUI then some HUD has probably poped on top of our osd and we need to repaint our OSD
Class := ClassOnTopAtXY(X+5,Y+5)

; check if anything has changed since last time... if so then re-display the new info, and update the lists
if ( (X != Osd3LastPosX%WinId%)
OR (Y != Osd3LastPosY%WinId%)
OR (Text != Osd3LastText%WinId%)
OR (Theme != Osd3LastTheme%WinId%)
OR (Class != "AutoHotkeyGUI") )
{

; since something has changed, we need to turn of the display which will reset the width when we display it at the bottom
DisplayOsd3Off(WinId)

; get a new gui num, since we just turned the display off
Osd3GuiNum%WinId% := DisplayOsd3GuiNumNext()

; save a local copy of the current guinum
GuiNum := Osd3GuiNum%WinId%


;outputdebug, Osd3 Re-displayed with GuiNum:%GuiNum% WinId:%WinId%


; save these values for next time, so we can check if something has changed
Osd3LastPosX%WinId% := X
Osd3LastPosY%WinId% := Y
Osd3LastText%WinId% := Text
Osd3LastTheme%WinId% := Theme




osdEx( Text, Theme, DisplayOsd3Font, X, Y,GuiNum) ;osdEx(msg="", options="", font="", x=0, y=0, gui=98)

}

}
; else turn off the display for this table
else
{
DisplayOsd3Off(WinId)
}


Critical, Off


;DllCall("QueryPerformanceCounter", "Int64 *", TimerAfter)
;TimerTest := 1000 * (TimerAfter - TimerBefore) / TimerFrequency
;outputdebug, Osd3 time: %WinId% %TimerTest%

}








; ----------------------------------------------------------------------------------------------------------------------






; return the next available gui num for the OSD4, that is not already in the GuiNumList
; returns 0 if we are already greater than MaxDisplayOsd4GuiNum constant... just so that we don't issue too many Guis
; this uses the guinums from 1-42 (max of 32)
; we put the numbers 1-32 in the list, but they are really offset to 1-32 (when used in the functions that use them as a guinum)
; the offset value is StartingDisplayOsd4GuiNumMinus1
; THIS FUNCTION MUST BE CALLED WITH Critical, on already in effect !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DisplayOsd4GuiNumNext()
{
global ; GuiNumList
local ListLength, NextN, OffsetIndex
;outputdebug, guinumnext
; I added the critical on in all of the GuiHighlighter functions, so it isn't necessary in here
;Critical, On ; since this function could be called by multiple time... need to make it uninterruptable


; get the length of the used Osd4 gui numbers
ListLength := ListLength(Osd4GuiNumList)

; if the list length is 0, then the first available number is 1
if NOT ListLength
{
NextN := StartingDisplayOsd4GuiNumMinus1 + 1
}
; else we will find the next available number
else
{
; loop thru the all the existing numbersnumbers and get the next available number

loop, %ListLength%
{

OffsetIndex := A_index + StartingDisplayOsd4GuiNumMinus1

; see if the index number is available
if ListGetPos(Osd4GuiNumList,OffsetIndex)
continue
else
{
; this index number is available
NextN := OffsetIndex
break
}
}
; if there were no holes available, take the next one
if NOT NextN
{
NextN := OffsetIndex + 1
}
if NextN > StartingDisplayOsd4GuiNumMinus1 + MaxDisplayOsd4GuiNum
NextN := 0
}
; add the next used gui number to the used list, as long as it is not 0 (no number available case)
; Plus add in the starting offset for our particular GUINUM
if NextN
{
ListAddItem(Osd4GuiNumList,NextN)
}
;outputdebug, NEW Osd3 number issued = %NextN%
;Critical Off

return NextN
}




; destroy the OSD4 display on Table WinId
; THIS FUNCTION MUST BE CALLED WITH Critical, on already activated
;
DisplayOsd4Off(WinId)
{
global
local GuiNum, Position ;, GuiId

; so that we don't end up with partial highlighters showing (since TimerFast might interrupt), use critical
;Critical, On

; if display is already off, then return
if NOT Osd4GuiNum%WinId%
{
;Critical, Off
return
}

; get the GuiNum for this highlighter
GuiNum := Osd4GuiNum%WinId%

; erase the GuiNum for this table
Osd4GuiNum%WinId% =

; erase the last x position, just so that we are sure something will be changed when we re-display this OSD
Osd4LastPosX%WinId% =


; kill this highlighter
Gui %GuiNum%: destroy

; remove this GuiNum from the active list
ListDelItem(Osd4GuiNumList,GuiNum)

;outputdebug, OSD3 off %GuiNum%


;Critical, Off
}






DisplayOsd4(WinId)
{
global
local Flag, X, Y, ClientScaleFactor, Text, OsdFontSize, Theme, TableRingOrTournament, WindowIsOverlayedFlag
local Stack, NumPlayers, NumBB, M, EM, NumTBB, PendingTableStartTime
local Bold, Italic
local TableActiveFlag, Position, Position1, Position2, GuiNum
local CasinoName
local Index, Levels, Parameter, Array, DisplayColor, HeroSeatedFlag
; we have some arrays... Level Color Array ; if we remove the Critical On, then we should define every possible array element here... now they are global


;outputdebug, in Osd4 WinId:%WinId%

;DllCall("QueryPerformanceFrequency", "Int64 *", TimerFrequency)
;DllCall("QueryPerformanceCounter", "Int64 *", TimerBefore)


if NOT (CasinoName := CasinoName(WinId,A_ThisFunc))
return




TableRingOrTournament := TableRingOrTournament(WinId)

; check if WinId is the active table
IfWinActive, ahk_group Tables ahk_id%WinId%
TableActiveFlag := 1
else
TableActiveFlag := 0

; check if hero is seated or not
HeroSeatedFlag := HeroSeated(WinId)

; get the scaled screen position of the position coordinates
X := %CasinoName%DisplayOsd4PosX
Y := %CasinoName%DisplayOsd4PosY
WindowScaledPos(X, Y, ClientScaleFactor, "Screen", WinId)

; WindowIsOverlayedFlag := WindowIsOverlayedAtXY(X,Y,WinId)
WindowIsOverlayedFlag := WindowIsOverlayed(WinId)

; so that we don't end up with partial gui number confusion, use critical on.... need this because we could call this from 2 different timers with different
; priorities, and if we get interrupted in the middle of one, the LISTs could be messed up.
; I think that we need critical on here too, because below we have some arrays are used that should be defined locally, but can't do that in AHK... arrays are Array, Level Color
Critical, On

;outputdebug, %WinId% activetable:%TableActiveFlag% HeroSeated=%HeroSeatedFlag%
;outputdebug, DisplayOsd4Enabled=%DisplayOsd4Enabled%
;outputdebug, TableActiveFlag=%TableActiveFlag%
;outputdebug, DisplayOsd4AllTablesEnabled=%DisplayOsd4AllTablesE nabled%
;outputdebug, TableRingOrTournament=%TableRingOrTournament%
;outputdebug, DisplayOsdStackInfoInRingGamesEnabled=%DisplayOsdS tackInfoInRingGamesEnabled%
;outputdebug, HeroSeated=%HeroSeatedFlag%


; display the Osd4 info on this table
; if
; DisplayOsd4Enabled
; and mouse button not held down
; and (TableActiveFlag OR (!TableActiveFlag AND DisplayOsd4AllTablesEnabled))
; and hero is seated
; and ((NOT TableRingOrTournament) OR DisplayOsdStackInfoInRingGamesEnabled)
; and window is not overlayed
if ( DisplayOsd4Enabled

AND (TableActiveFlag OR (!TableActiveFlag AND DisplayOsd4AllTablesEnabled))
AND (HeroSeatedFlag == 1)
AND ((NOT TableRingOrTournament) OR DisplayOsdStackInfoInRingGamesEnabled)
AND (NOT WindowIsOverlayedFlag) )
{

; AND (!(GetKeyState("LButton", "P") OR GetKeyState("RButton", "P")) )

; get all of the current information for this table

; get the scaled screen position of the position coordinates
; X := %CasinoName%DisplayOsd4PosX
; Y := %CasinoName%DisplayOsd4PosY
; WindowScaledPos(X, Y, ClientScaleFactor, "Screen", WinId)

; get the number of players at this table, but only if we actually need this parameter
if (instr(DisplayOsd4Text,"!m") OR instr(DisplayOsd4Text,"!p") OR instr(DisplayOsd4Text,"!e") OR instr(DisplayOsd4Text,"!o"))
NumPlayers := TablePlayers(WinId)
else
NumPlayers := 1

; get the blinds and Antes (into global vars)
TableBlinds(WinId)

; get the hero's stack size, but only if it is needed
if (instr(DisplayOsd4Text,"!$") OR instr(DisplayOsd4Text,"!n") OR instr(DisplayOsd4Text,"!m") OR instr(DisplayOsd4Text,"!e") OR instr(DisplayOsd4Text,"!o"))
Stack := HeroStack(WinId)
else
Stack := 0

;Stack # size if found
;S if sitting out
;A if All In
;"" if not found

; if the stack digits blank out, then just use the last stack value
if ((Stack == "") OR (Stack == "S"))
Stack := Osd4LastStack%WinId%

if (Stack == "A")
Stack := 0

; save the last stack size for next time thru this function
Osd4LastStack%WinId% := Stack

; get this table's pending start time,
; if it is in the pending table list (so we can display the time in the display routines below)
Position1 := ListGetPos(TableIDPendingList,WinId)
if Position1
PendingTableStartTime := Round(((A_TickCount - ListGetItem(TableIDPendingTimeList,Position1))/1000),0)
else
PendingTableStartTime := "0"

; calculate #BB and ~M, and round them off
NumBB := Stack / BigBlind%WinId%
if NumBB >= 10
NumBB := Round(NumBB,0)
else
NumBB := Round(NumBB,1)

; calculate Harrington's M value
M := Stack / (BigBlind%WinId% + SmallBlind%WinId% + Ante%WinId% * NumPlayers)
if M >= 10
M := Round(M,0)
else
M := Round(M,1)

; calculate Harrington's effective M
EM := (Stack / (BigBlind%WinId% + SmallBlind%WinId% + Ante%WinId% * NumPlayers)) * (NumPlayers / 10)
if EM >= 10
EM := Round(EM,0)
else
EM := Round(EM,1)

; calculate tBB i.e. True BB as discussed in http://forumserver.twoplustwo.com/sh...97&page=0&vc=1
; you add BB plus 2/3 of the antes
NumTBB := Stack / (BigBlind%WinId% + Ante%WinId% * NumPlayers * 2 / 3)
if NumTBB >= 10
NumTBB := Round(NumTBB,0)
else
NumTBB := Round(NumTBB,1)



; break the Osd4 color string into an array
StringSplit,Array,DisplayOsd4Color,`,

;outputdebug, %Array0% %Array1% %Array2% %Array3% %Array4%

; if the array only has one element, then it must be a solid color, independent of any parameters
if (Array0 <= 1)
DisplayColor := DisplayOsd4Color
; else the user must have entered a selection of colors and levels to change the color at.
else
{
; find out how many "less than or equal to levels we have"
Levels := ((Array0) / 2) - 1
; assign the levels and colors from the color array
Index := 1 ; index pointer into the array (1 points to the criteria, e.g. !b )
Loop, % Levels
{
Index++
Level%a_index% := Array%Index%
Index++
Color%a_index% := Array%Index%
}
; get the upper color (default) if the value is above all other levels, the last color in the string (or array)
Index++
ColorDefault := Array%Index%
;outputdebug, ColorDefault=%ColorDefault%
; get the value of the parameter we are checking for
if (Array1 == "!n")
Parameter := NumBB
else if (Array1 == "!m")
Parameter := M
else if (Array1 == "!p")
Parameter := NumPlayers
else if (Array1 == "!$")
Parameter := Stack
else if (Array1 == "!e")
Parameter := EM
else if (Array1 == "!o")
Parameter := NumTBB
else if (Array1 == "!b")
Parameter := BigBlind%WinId%
else if (Array1 == "!t")
Parameter := PendingTableStartTime
;outputdebug, Parameter=%Parameter%

; loop thru the levels to determine the color
DisplayColor := ColorDefault ; set the default color, in case we don't get a match in any of the levels
loop, % Levels
{
if (Parameter <= Level%a_index%)
{
DisplayColor := Color%a_index%
break
}
}
}

;outputdebug, DisplayColor=%DisplayColor%

OsdFontSize := Round(DisplayOsd4FontSize * ClientScaleFactor)

Text := DisplayOsd4Text
; make sure there are no "|" characters in here, as this is our delimeter, remove them all
StringReplace, Text, Text,|,,All

; see if there are any option strings
Italic := iif( InStr(Text, "!2"), "italic", "" )
Bold := iif( InStr(Text, "!3"), "bold", "" )
; remove any option strings from the text
StringReplace, Text, Text,!2,,All
StringReplace, Text, Text,!3,,All

StringReplace, Text, Text,!r,`n,All
StringReplace, Text, Text,!!,!,All

StringReplace, Text, Text,!b,% BigBlind%WinId%,All
StringReplace, Text, Text,!s,% SmallBlind%WinId%,All
StringReplace, Text, Text,!a,% Ante%WinId%,All

StringReplace, Text, Text,!$,%Stack%,All
StringReplace, Text, Text,!m,%M%,All
StringReplace, Text, Text,!n,%NumBB%,All
StringReplace, Text, Text,!e,%EM%,All
StringReplace, Text, Text,!p,%NumPlayers%,All

StringReplace, Text, Text,!t,%PendingTableStartTime%,All

StringReplace, Text, Text,!o,%NumTBB%,All



if TableRingOrTournament
StringReplace, Text, Text,!q,% "DM:" . DealMeModeState%WinId%,All
else
StringReplace, Text, Text,!q,,All

; if there are any double next lines, remove one of them
StringReplace, Text, Text,`n`n,`n,All

Theme = c%DisplayColor% s%OsdFontSize% %Bold% %Italic% ; size, color, bold/italic

; get the class name of the process at XY
; if it is not AutoHotkeyGUI then some HUD has probably poped on top of our osd and we need to repaint our OSD
Class := ClassOnTopAtXY(X+5,Y+5)

; check if anything has changed since last time... if so then re-display the new info, and update the lists
if ( (X != Osd4LastPosX%WinId%)
OR (Y != Osd4LastPosY%WinId%)
OR (Text != Osd4LastText%WinId%)
OR (Theme != Osd4LastTheme%WinId%)
OR (Class != "AutoHotkeyGUI") )
{

; since something has changed, we need to turn of the display which will reset the width when we display it at the bottom
DisplayOsd4Off(WinId)

; get a new gui num, since we just turned the display off
Osd4GuiNum%WinId% := DisplayOsd4GuiNumNext()

; save a local copy of the current guinum
GuiNum := Osd4GuiNum%WinId%


;outputdebug, Osd4 Re-displayed with GuiNum:%GuiNum% WinId:%WinId%


; save these values for next time, so we can check if something has changed
Osd4LastPosX%WinId% := X
Osd4LastPosY%WinId% := Y
Osd4LastText%WinId% := Text
Osd4LastTheme%WinId% := Theme




osdEx( Text, Theme, DisplayOsd4Font, X, Y,GuiNum) ;osdEx(msg="", options="", font="", x=0, y=0, gui=98)

}

}
; else turn off the display for this table
else
{
DisplayOsd4Off(WinId)
}


Critical, Off


;DllCall("QueryPerformanceCounter", "Int64 *", TimerAfter)
;TimerTest := 1000 * (TimerAfter - TimerBefore) / TimerFrequency
;outputdebug, Osd4 time: %WinId% %TimerTest%

}



DisplayOsd5(WinId)
{
global
local Flag, X, Y, ClientScaleFactor, Text, OsdFontSize, Theme, TableRingOrTournament, WindowIsOverlayedFlag
local Stack, NumPlayers, NumBB, M, EM, NumTBB, PendingTableStartTime
local Bold, Italic
local TableActiveFlag, Position, Position1, Position2, GuiNum
local CasinoName
local Index, Levels, Parameter, Array, DisplayColor
; we have some arrays... Level Color Array ; if we remove the Critical On, then we should define every possible array element here... now they are global

local TableSeats, MouseX, MouseY, MouseCloseToPlayerNum
local WindowX, WindowY, WindowW, WindowH, ClientW, ClientH, WindowTopBorder, WindowBottomBorder, WindowSideBorder


local Osd5GuiNum := 98
static Osd5LastPosX := 0
static Osd5LastPosY := 0
static Osd5LastTheme := ""
static Osd5LastText := ""
static Osd5LastStack := 0





;outputdebug, in Osd5 WinId:%WinId% %DisplayOsd5Enabled% %DisplayOsd5Color% %DisplayOsd5FontSize% %DisplayOsd5Font% %DisplayOsd5Text%

;DllCall("QueryPerformanceFrequency", "Int64 *", TimerFrequency)
;DllCall("QueryPerformanceCounter", "Int64 *", TimerBefore)


if NOT (CasinoName := CasinoName(WinId,A_ThisFunc))
return


; determine if the mouse is close to any player's box

; this is the seat we are close to... init to 0 in case we don't find that we are close to any player's box later
MouseCloseToPlayerNum := 0


; get the mouse's position on this table
CoordMode, Mouse, Relative
MouseGetPos, MouseX, MouseY, MouseOverTableId

;outputdebug, Mouse1: %MouseX% %MouseY%

; if the mouse is NOT over a table, set the id to 0, so we can exit later
ifWinNotExist, ahk_id%MouseOverTableId% ahk_group Tables
MouseOverTableId := 0


WindowInfo(WindowX, WindowY, WindowW, WindowH, ClientW, ClientH, WindowTopBorder, WindowBottomBorder, WindowSideBorder, WinId)

; convert the mouse position to just the client area
MouseX -= WindowSideBorder
MouseY -= WindowTopBorder

;outputdebug, Mouse2: %MouseX% %MouseY% ClientWH: %ClientW% %ClientH%

; convert the mouse's position to a normal size table position (in the client area)
MouseX := MouseX * %CasinoName%StandardClientWidth / ClientW
MouseY := MouseY * %CasinoName%StandardClientHeight / ClientH

;outputdebug, Mouse3: %MouseX% %MouseY%

; find the number of seats at this table
TableSeats := TableSeats(WinId)
; loop through all the seats, and see if the mouse is within Osd5DistanceTolerance from the center of a players box
loop, %TableSeats%
{
; find the distance from the mouse to the center of the player's box
if ( ( Distance(MouseX,MouseY, %CasinoName%PlayerBoxSeats%TableSeats%Seat%A_Index %X + %CasinoName%StackCenterOffsetX, %CasinoName%PlayerBoxSeats%TableSeats%Seat%A_Index %Y + %CasinoName%StackCenterOffsetY) ) < Osd5DistanceTolerance)
{
MouseCloseToPlayerNum := A_Index
break

}
}








; get the scaled screen position of the position coordinates
X := %CasinoName%DisplayOsd5PosX
Y := %CasinoName%DisplayOsd5PosY
WindowScaledPos(X, Y, ClientScaleFactor, "Screen", WinId)

;outputdebug, XY: %X% %Y%


; WindowIsOverlayedFlag := WindowIsOverlayedAtXY(X,Y,WinId)
WindowIsOverlayedFlag := WindowIsOverlayed(WinId)



; so that we don't end up with partial gui number confusion, use critical on.... need this because we could call this from 2 different timers with different
; priorities, and if we get interrupted in the middle of one, the LISTs could be messed up.
; I think that we need critical on here too, because below we have some arrays are used that should be defined locally, but can't do that in AHK... arrays are Array, Level Color
; Critical, On

;outputdebug, %WinId% activetable:%TableActiveFlag% HeroSeated=%HeroSeatedFlag%
;outputdebug, DisplayOsd5Enabled=%DisplayOsd5Enabled%
;outputdebug, TableActiveFlag=%TableActiveFlag%
;outputdebug, DisplayOsd5AllTablesEnabled=%DisplayOsd5AllTablesE nabled%
;outputdebug, TableRingOrTournament=%TableRingOrTournament%
;outputdebug, DisplayOsdStackInfoInRingGamesEnabled=%DisplayOsdS tackInfoInRingGamesEnabled%
;outputdebug, HeroSeated=%HeroSeatedFlag%


; display the Osd5 info on this table
; if
; DisplayOsd5Enabled
; and MouseCloseToPlayerNum is > 0 (i.e. mouse is near a player's box)
; and the mouse is over a table (MouseOverTableId <> 0)
; and window is not overlayed
if ( DisplayOsd5Enabled
AND MouseCloseToPlayerNum
AND MouseOverTableId
AND (NOT WindowIsOverlayedFlag) )
{


TableRingOrTournament := TableRingOrTournament(WinId)


; AND (!(GetKeyState("LButton", "P") OR GetKeyState("RButton", "P")) )

; get all of the current information for this table

; get the scaled screen position of the position coordinates
; X := %CasinoName%DisplayOsd5PosX
; Y := %CasinoName%DisplayOsd5PosY
; WindowScaledPos(X, Y, ClientScaleFactor, "Screen", WinId)

; get the number of players at this table, but only if we actually need this parameter
if (instr(DisplayOsd5Text,"!m") OR instr(DisplayOsd5Text,"!p") OR instr(DisplayOsd5Text,"!e") OR instr(DisplayOsd5Text,"!o"))
NumPlayers := TablePlayers(WinId)
else
NumPlayers := 1

; get the blinds and Antes (into global vars)
TableBlinds(WinId)

; get the Player's stack size, but only if it is needed
if (instr(DisplayOsd5Text,"!$") OR instr(DisplayOsd5Text,"!n") OR instr(DisplayOsd5Text,"!m") OR instr(DisplayOsd5Text,"!e") OR instr(DisplayOsd5Text,"!o"))
Stack := PlayersStack(MouseCloseToPlayerNum,WinId)
else
Stack := 0

;Stack # size if found
;S if sitting out
;A if All In
;"" if not found

; if the stack digits blank out, then just use the last stack value
if ((Stack == "") OR (Stack == "S"))
Stack := 0

if (Stack == "A")
Stack := 0

; save the last stack size for next time thru this function
Osd5LastStack := Stack

; get this table's pending start time,
; if it is in the pending table list (so we can display the time in the display routines below)
Position1 := ListGetPos(TableIDPendingList,WinId)
if Position1
PendingTableStartTime := Round(((A_TickCount - ListGetItem(TableIDPendingTimeList,Position1))/1000),0)
else
PendingTableStartTime := "0"





; calculate #BB and ~M, and round them off
NumBB := Stack / BigBlind%WinId%
if NumBB >= 10
NumBB := Round(NumBB,0)
else
NumBB := Round(NumBB,1)

; calculate Harrington's M value
M := Stack / (BigBlind%WinId% + SmallBlind%WinId% + Ante%WinId% * NumPlayers)
if M >= 10
M := Round(M,0)
else
M := Round(M,1)

; calculate Harrington's effective M
EM := (Stack / (BigBlind%WinId% + SmallBlind%WinId% + Ante%WinId% * NumPlayers)) * (NumPlayers / 10)
if EM >= 10
EM := Round(EM,0)
else
EM := Round(EM,1)

; calculate tBB i.e. True BB as discussed in http://forumserver.twoplustwo.com/sh...97&page=0&vc=1
; you add BB plus 2/3 of the antes
NumTBB := Stack / (BigBlind%WinId% + Ante%WinId% * NumPlayers * 2 / 3)
if NumTBB >= 10
NumTBB := Round(NumTBB,0)
else
NumTBB := Round(NumTBB,1)



; break the Osd5 color string into an array
StringSplit,Array,DisplayOsd5Color,`,

;outputdebug, %Array0% %Array1% %Array2% %Array3% %Array4%

; if the array only has one element, then it must be a solid color, independent of any parameters
if (Array0 <= 1)
DisplayColor := DisplayOsd5Color
; else the user must have entered a selection of colors and levels to change the color at.
else
{
; find out how many "less than or equal to levels we have"
Levels := ((Array0) / 2) - 1
; assign the levels and colors from the color array
Index := 1 ; index pointer into the array (1 points to the criteria, e.g. !b )
Loop, % Levels
{
Index++
Level%a_index% := Array%Index%
Index++
Color%a_index% := Array%Index%
}
; get the upper color (default) if the value is above all other levels, the last color in the string (or array)
Index++
ColorDefault := Array%Index%
;outputdebug, ColorDefault=%ColorDefault%
; get the value of the parameter we are checking for
if (Array1 == "!n")
Parameter := NumBB
else if (Array1 == "!m")
Parameter := M
else if (Array1 == "!p")
Parameter := NumPlayers
else if (Array1 == "!$")
Parameter := Stack
else if (Array1 == "!e")
Parameter := EM
else if (Array1 == "!o")
Parameter := NumTBB
else if (Array1 == "!b")
Parameter := BigBlind%WinId%
else if (Array1 == "!t")
Parameter := PendingTableStartTime
;outputdebug, Parameter=%Parameter%

; loop thru the levels to determine the color
DisplayColor := ColorDefault ; set the default color, in case we don't get a match in any of the levels
loop, % Levels
{
if (Parameter <= Level%a_index%)
{
DisplayColor := Color%a_index%
break
}
}
}

;outputdebug, DisplayColor=%DisplayColor%

OsdFontSize := Round(DisplayOsd5FontSize * ClientScaleFactor)

Text := DisplayOsd5Text
; make sure there are no "|" characters in here, as this is our delimeter, remove them all
StringReplace, Text, Text,|,,All

; see if there are any option strings
Italic := iif( InStr(Text, "!2"), "italic", "" )
Bold := iif( InStr(Text, "!3"), "bold", "" )
; remove any option strings from the text
StringReplace, Text, Text,!2,,All
StringReplace, Text, Text,!3,,All

StringReplace, Text, Text,!r,`n,All
StringReplace, Text, Text,!!,!,All

StringReplace, Text, Text,!b,% BigBlind%WinId%,All
StringReplace, Text, Text,!s,% SmallBlind%WinId%,All
StringReplace, Text, Text,!a,% Ante%WinId%,All

StringReplace, Text, Text,!$,%Stack%,All
StringReplace, Text, Text,!m,%M%,All
StringReplace, Text, Text,!n,%NumBB%,All
StringReplace, Text, Text,!e,%EM%,All
StringReplace, Text, Text,!p,%NumPlayers%,All

StringReplace, Text, Text,!t,%PendingTableStartTime%,All

StringReplace, Text, Text,!o,%NumTBB%,All

if TableRingOrTournament
StringReplace, Text, Text,!q,% "DM:" . DealMeModeState%WinId%,All
else
StringReplace, Text, Text,!q,,All

; if there are any double next lines, remove one of them
StringReplace, Text, Text,`n`n,`n,All

Theme = c%DisplayColor% s%OsdFontSize% %Bold% %Italic% ; size, color, bold/italic

; get the class name of the process at XY
; if it is not AutoHotkeyGUI then some HUD has probably poped on top of our osd and we need to repaint our OSD
Class := ClassOnTopAtXY(X+5,Y+5)

; check if anything has changed since last time... if so then re-display the new info, and update the lists
if ( (X != Osd5LastPosX)
OR (Y != Osd5LastPosY)
OR (Text != Osd5LastText)
OR (Theme != Osd5LastTheme)
OR (Class != "AutoHotkeyGUI") )
{

; since something has changed, we need to turn of the display which will reset the width when we display it at the bottom
osdEx("","","",0,0,98)


;outputdebug, Osd5 Re-displayed with GuiNum:%GuiNum% WinId:%WinId%


; save these values for next time, so we can check if something has changed
Osd5LastPosX := X
Osd5LastPosY := Y
Osd5LastText := Text
Osd5LastTheme := Theme




osdEx( Text, Theme, DisplayOsd5Font, X, Y,Osd5GuiNum) ;osdEx(msg="", options="", font="", x=0, y=0, gui=98)

}

}
; else turn off the display for this table
else
{
; erase the tooltip and OSDs
osdEx("","","",0,0,98)
}


;Critical, Off


;DllCall("QueryPerformanceCounter", "Int64 *", TimerAfter)
;TimerTest := 1000 * (TimerAfter - TimerBefore) / TimerFrequency
;outputdebug, Osd5 time: %WinId% %TimerTest%

}







; from Roland's functions
; similar to osd(), but the position is meant to be spedified here
; to destroy the gui/message, call the function without
; any parameters
; Options are
; sxx font size, where xx is the size
; bold
; italic
; cxx color, where xx is a hex number or a word color
; center
; wxxx width of osd in pixels... I removed the width from the main osd below... see note below. the width no just defaults to whatever the text takes up.
;
; if ParentWinId is specified, then the OSD will be attached to that window, and X,Y will be relative to that window... else X,Y is relative to the screen

/*
I am having getting the set parent to work. It seems to end up invisible. I have a test routine in PokerShortcuts.ahk label: F7
to test, but I wasn't able to get it working.
*/
; osdEx() sometime causes AHK to spit out an error message "The same variable cannot be used for more than one control"
; so I now make sure that it can't be called by two functions at the same time (by using a Critical, On in all functions that call this function.)
osdEx(msg="", options="", font="", x=0, y=0, gui=98) {
global osdEx_msg ; this is used as a variable name for each GUI created...
; the gui num further defines each one, but they all have this Control Name
options := a_space . options . a_space
size := StrEnd(options, "s")
size := iif( size, size, 30 )
bold := iif( InStr(options, " bold "), "bold", "" )
italic := iif( InStr(options, " italic "), "italic", "" )
color := StrEnd(options, "c")
color := iif( color, color, "white" )
theme = s%size% c%color% %bold% %italic%
font := iif( font, font, "Comic Sans MS" )
width := StrEnd(options, "w")
width := iif( width, width, a_screenwidth )
center := iif( InStr(options, " center "), "center", "" )
Gui, %gui%: Default
; need to leave this destroy code in for some of the code kills the gui using this method
If ( msg="" ) {
Gui, Destroy
return
}
Gui +LastfoundExist
If WinExist() { ; if this Gui num already exists... change the color and text (if the width is now different compared to the last time it was displayed, the display may not show up correctly)

Gui, Show, x%x% y%y% NoActivate
Gui, Font, s%size% c%color% %bold% %italic%, font ; set the font attributes for the font again, in case it changed
GuiControl, Font, osdEx_msg ; this attaches the font parameters above to the GUI control (whose control name is osdEx_msg)
GuiControl,, osdEx_msg, %msg% ; writes the new text to the control...
; if the width changes a lot, it might not fit in the old width
; there is a width command
return
}
Gui, +Lastfound +Toolwindow +AlwaysOnTop
Gui, Color, Black
WinSet, TransColor, Black
Gui -Caption
Gui, Margin, 0, 0
Gui, Font, %theme%, %font%
; Gui, Add, Text, vosdEx_msg w%width% %center%, %msg% ; adds a text control to the GUI, with the name of osdEx_msg
; I removed the WIDTH command because it was defaulting to a_screenwidth if I didn't specify it... the display was then on top of a lot of stuff across the screen.
; if you don't specify width, it just takes up as much width as the text needs
Gui, Add, Text, vosdEx_msg %center%, %msg% ; adds a text control to the GUI, with the name of osdEx_msg
Gui, +E0x20 ; WS_EX_TRANSPARENT - allows a mouse to be able to click thru this overlay window (and move something below it)

; if ParentWinId
; SetParent(ParentWinId,gui)

Gui, Show, x%x% y%y% NoActivate

}


; turns Gui #'gui' into a child window of 'win'
setParent(win, gui) {
Gui, %gui%: +LastFound
return DllCall("SetParent", "uint", WinExist(), "uint", win)
}
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-02-2010 , 12:52 AM
When I join a table I want to automatically sit out the next hand. I want to buy in and then sit out right away. How do I make that happen?
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-04-2010 , 01:14 PM
Quote:
Originally Posted by Tiltytilterson

One of the features that PSC has over TNFT is the ability to display an on screen display that gives # of players left, # of BB, tiime left at level, blind level, etc... This tool is very helpful for SNG Multitablers.
this was still working for me until today's FTP update altered the fonts. has anyone been able to fix this for themselves yet? i am thinking just being to change the fonts back would do it.

thx
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-04-2010 , 02:43 PM
Quote:
Originally Posted by anteatereater
this was still working for me until today's FTP update altered the fonts. has anyone been able to fix this for themselves yet? i am thinking just being to change the fonts back would do it.

thx
Still working here. You can change the layout.xml if the username and the stack size "touch".

see here
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-04-2010 , 04:02 PM
Quote:
Originally Posted by rubbishaka80
Still working here. You can change the layout.xml if the username and the stack size "touch".

see here
Thanks for the reply. I am still not undertsanding. The link you posted just pops up a new window to this same web page.

Can you elaborate when you get a chance?

Thanks again.
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-04-2010 , 08:16 PM
In post #1013 SiQ explains everything.

I didn't see the fonts change, btw. Maybe it affects only certain table sizes?
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-05-2010 , 12:07 AM
Quote:
Originally Posted by rubbishaka80
In post #1013 SiQ explains everything.

I didn't see the fonts change, btw. Maybe it affects only certain table sizes?
Okay. I understand. Thank you very much.

In my case, the username and stack size aren't overlapping or touching, but something about the font change is freaking out poker shortcuts, because the number of BBs it displays is often wrong now.

I'll keep trying to figure out how to get the original fonts back. Also, Poker Shortcuts will no longer hit the "i'm ready" and "i'm back" buttons for me.

Last edited by anteatereater; 11-05-2010 at 12:12 AM.
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-05-2010 , 01:34 PM
I was able to get the old fonts back for plr_name and plr_balance, but this didn't fix the problem. the number of BBs displayed on the table for me during play is often wrong and therefore unusable. the blind level that gets displayed (like 20/40, 50/100, etc) does work fine. So that's still useful.

Is there another program that is capable of displaying the number of BBs on the table?

Thanks
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-07-2010 , 05:14 PM
does osd 3,4 or 5 work for anyone on pokerstars with hypersimple theme? Didn't work for me on the old poker shortcuts and it doesn't work with the revision 11 :/
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-09-2010 , 11:11 PM
is there an auto time button with this?
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-09-2010 , 11:32 PM
Quote:
Originally Posted by Kenneth Bania
is there an auto time button with this?
found this.

lots of features
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-11-2010 , 06:26 PM
ok ive just read over the last several pages of this thread and am considering downloading and installing poker shortcuts to use with xpadder/xbox360 controller for PokerStars.

however i am a bit confused as to which version i should download and whether i need to DL/install other programs before hand for it to run properly?

can anyone help me out here i just need a few quick answers and whether i am wasting my time trying to get this up and running
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-20-2010 , 11:25 AM
ktx-
you need autohotkey and the _r11 version of PSC

see post # 1638
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-20-2010 , 11:51 AM
Kind souls.... I am in need. I have done my best to be helpful in this thread and now it is my turn to come hat in hand asking for the programming gurus to help me.

Migrating from a Vista-32 OC (old computer) to Win7-64 NC ("new" computer) and am having problems getting Pokershortcuts to work on Rush tables. (Works great...if not better.... on standard FR tables!)

Tried lots of tweaks so..... some of the things that are particular to my setup:

1. I moved a physical drive ( F: ) to the new computer. This has FTP loaded and I am able to start and play poker off of this drive. This is a different setup to OC... where FTP was loaded TO F:...... on the OC, FTP shows up in the add/remove area of Control Panel. On the NC, FTP is not listed. Question: This shouldn't matter to Pokershortcuts, should it? I mean cmon, regular tables work great!

2. On the OC, my table felt was different. I had modified my FR tables to be near-black but left the rush tables standard w/ Rush logo. PSC worked for both. However, I don't understand HOW? Not that I need the HOW answered,,,, but why do we need to calibrate tables if two totally distinct colors work? Related more basic question: Is the regular table found

F:ProgFile\FTP\Graphics\New Table\Classic\Background ???

At that location I see table.svg and Rush_Table.svg and I am able to change the background of the Rush tables by copying table.svg and renaming and replacing Rush_table.svg. So now I have both felts the same (if I want). But PSC doesn't work on Rush tables no matter what felt I have.

(I have looked in the .ahk and found the added line (with the extra space) for Rush)


3. Loading PSC into Program Files or Program Files (x86) make a difference?

4. MAYBE the ROOT of my problem: In all tweaks I have tried, in ALL cases when I right click PokerShortcuts.ahk, I DO NOT get the option to Run As Administrator.....nor set a compatibility mode. Some of the things I can do is Run Pokershortcuts.exe as Admin...as well as set compatibilty. I can also set Autohotkey.exe to run as Admin and set a compatibility. I right click on the PokerShortcut.ahk>Properties and get a warning at the bottom that says "This file came from another ccomputer and might be blocked to help protect this computer". There is an Unblock button that I have "tried" to use...but maybe I'm tweaking wrong here....I am very new to Win7 and 64bit computing.
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-20-2010 , 01:29 PM
There is a little difference in titles between regular and rush tabels
Quote:
(I have looked in the .ahk and found the added line (with the extra space) for Rush)
I guess this is supposed to handle rush tables but maybe it is not enough? I'm on W7 x64, PSC works fine for me on Rush tables with the code given below (same lines in PokerShortCuts.ahk should be replaced) and it wasn't working without these changes.
I suppose PSC was working fine for you on Rush tables under Vista but give it a try anyway.
Code:
; define group definitions for poker tables and lobbies
; GroupAdd, name, "text in title",,, "text not in title"

GroupAdd, PokerShortcuts, Poker Shortcuts ahk_class AutoHotkeyGUI

GroupAdd, Lobby, Full Tilt Poker - Logged In As ahk_class QWidget
GroupAdd, Lobby, PokerStars Lobby ahk_class #32770,,,Tournament

GroupAdd, TournamentLobby, Full Tilt Poker - Tournament ahk_class QWidget
GroupAdd, TournamentLobby, Lobby ahk_class #32770,,,PokerStars

; GroupAdd, Tables, ahk_class FTC_TableViewFull
GroupAdd, Tables, ahk_class PokerStarsTableFrameClass
GroupAdd, Tables, Logged In ahk_class QWidget,,,Full Tilt


GroupAdd, FTTables, Logged In ahk_class QWidget,,,Full Tilt
GroupAdd, PSTables, ahk_class PokerStarsTableFrameClass

GroupAdd, LastHand, Last Hand History ahk_class QWidget
GroupAdd, LastHand, Instant Hand History ahk_class #32770

GroupAdd, Cashier, Cashier - ahk_class QWidget
GroupAdd, Cashier, Cashier ahk_class #32770

GroupAdd, Notes, Player Note: ahk_class QWidget
; no equivalent window for Poker Stars

GroupAdd TournamentInfo, Tournament Status ahk_class QWidget
; no equivalent window for Poker Stars



; create a group for FT major windows
GroupAdd, FTWindow, Full Tilt Poker - Logged In As ahk_class QWidget
GroupAdd, FTWindow, Full Tilt Poker - Tournament ahk_class QWidget
GroupAdd, FTWindow, Logged In ahk_class QWidget,,,Full Tilt Poker -


; create a group for PS major windows
GroupAdd, PSWindow, PokerStars Lobby ahk_class #32770,,,Tournament
GroupAdd, PSWindow, Lobby ahk_class #32770,,,PokerStars
GroupAdd, PSWindow, ahk_class PokerStarsTableFrameClass

; create a group for just the FT lobby
GroupAdd, FTLobby, Full Tilt Poker - Logged In As ahk_class QWidget

; create a group for just the PS lobby
GroupAdd, PSLobby, PokerStars Lobby ahk_class #32770,,,Tournament

; create a group for the PS Options dialog box
GroupAdd, PSOptions, Options ahk_class #32770

; create a group for the PS tournament lobby
GroupAdd, PSTournamentLobby, Lobby ahk_class #32770,,,PokerStars

; create a group for the FT tournament lobby
GroupAdd, FTTournamentLobby, Full Tilt Poker - Tournament ahk_class QWidget

GroupAdd, SngTables, Sit & Go ahk_class QWidget,,,Play Money
GroupAdd, SngTables, Madness ahk_class QWidget,,,Play Money
GroupAdd, SngTables, Sit&Go ahk_class QWidget,,,Play Money
GroupAdd, SngTables, Play Money Sit & Go ahk_class QWidget
GroupAdd, SngTables, Play Money KO Sit & Go ahk_class QWidget

GroupAdd, SngTables, Tournament ahk_class PokerStarsTableFrameClass ; we can't exclude regular tournaments here


; Stars dialog boxes
GroupAdd, Dialogs, ahk_Class #32770,,,PokerStars Lobby,

; FT dialog boxes - ignore tables/lobbies that are class: QWidget by check for "- Logged In As"
GroupAdd, QWidgetDialogs, ahk_class QWidget,,,Logged In,

Last edited by Max1mums; 11-20-2010 at 01:40 PM.
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
11-20-2010 , 02:22 PM
Max... script modification above works. And Imma not gunna change a thing

Just for reference, I have:

AHK run as Admin, XP3 mode (maybe not nec..but Imma stickin' to what works)
PSC loaded on F:\PgmFile (not PgmFiles(x86)
Start with .ahk, not .exe

Thank you very much Max!
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
12-04-2010 , 05:34 AM
First time trying PSC on this computer, Win7:

Error in #include file ... FunctionsSng.ahk:
Unsupported use of "."

314: DisplaySeconds := ":0" . DislpaySeconds
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
12-21-2010 , 02:45 PM
Braaaaaah!!!

After I open 2 SnG's, it says i have too many real money tables open for the 'unregistered version'

Can anyone help me on this kink? Ive followed there set-up instructions closely and am confident I didnt over-look anything.

Doesn't seem logical for a multi-tabling software to shut down due to too many tables being open?

Braaaaah!
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
12-29-2010 , 07:54 AM
Hi!

I've just made a basic autohotkey script for FTP cash game, using keyboard playing poker. It can help, if you are playing on 6 tables, at 1680*1050 desktop resolution.

You can download it from here:

http://www.2shared.com/file/fPvexlG1...lti6table.html

or copy/paste from below:



; FTPmulti6table.ahk
;
; Basic AutoHotKey script for multi-table playing on Full Tilt Poker
;
; Dec/29/2010
;
; Email: AdrianGoldstein82@gmail.com
;
; This script is for playing at 1680x1050 resolution and 6 racetrack w/o avatar tables tiled on desktop by FTP client
;
;
;
; Description:
; You can select tables by pressing q,w,e,a,s,d
; You can select Fold/Check/Bet buttons and checkboxes by pressing Numpad1, Numpad2, Numpad3 (when NumLock is On)
; You can raise, decraise the size of your bet by pressing Numpad+, Numpad-
; You can make potsize bet by pressing Numpad4
; You can make maximum size (All-In) bet by pressing Numpad6
; You can select "Fold to any bet", "Sit-out" and "Auto-post blinds" checkboxes by pressing t,g,b
;
;
;




CoordMode, Mouse, Screen

;Table Top-Left select

q::
SendInput {Click 220,400}
return


;Table Top select

w::
SendInput {Click 780,400}
return


;Table Top-Right select

e::
SendInput {Click 1340,400}
return


;Table Bottom-Left select

a::
SendInput {Click 220,425}
return


;Table Bottom select

s::
SendInput {Click 780,425}
return


;Table Bottom-Right select

d::
SendInput {Click 1340,425}
return



;Fold To Any Bet

t::
SendInput {Click 243,371}
SendInput {Click 803,371}
SendInput {Click 1363,371}
SendInput {Click 243,785}
SendInput {Click 803,785}
SendInput {Click 1363,785}
return


;Sit-Out

g::
SendInput {Click 243,387}
SendInput {Click 803,387}
SendInput {Click 1363,387}
SendInput {Click 243,801}
SendInput {Click 803,801}
SendInput {Click 1363,801}
return


;Auto-Post Blinds

b::
SendInput {Click 243,403}
SendInput {Click 803,403}
SendInput {Click 1363,403}
SendInput {Click 243,817}
SendInput {Click 803,817}
SendInput {Click 1363,817}
return



CoordMode, Mouse, Relative


;Fold button + check/fold checkbox

Numpad1::
SendInput {Click 359,378}
SendInput {Click 347,380}
SendInput {Click 347,380}
return


;Call/Check button + call / check checkbox

Numpad2::
SendInput {Click 430,378}
SendInput {Click 419,380}
SendInput {Click 419,380}
return


;Bet/Raise button

Numpad3::
SendInput {Click 522,378}
return


;betsize-

NumpadSub::
SendInput {Click 484,347}
return


;betsize+

NumpadAdd::
SendInput {Click 548,347}
return


;Potsizebet

Numpad4::
SendInput {Click 495,321}
return


;Maxsizebet

Numpad6::
SendInput {Click 538,321}
return
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
01-19-2011 , 12:37 PM
Hey guys, I haven't used the programme in a while and just re-installed it on my new PC. It seems that Fixed Bets don't work any more with FTP (other hotkeys do work). Can anybody confirm this or did I make a mistake?
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
01-31-2011 , 11:51 AM
Hello, when i move a table back into the stack, it gets moved to the top of the stack over a window that needs action. Anybody changed this so that it goes to the bottom? Or simply not covers up the current table?
Thanks
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
02-09-2011 , 10:09 PM
i'll pay someone 20$ to get this working on stars and FTP for me. thanks.
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote
02-11-2011 , 12:43 PM
Quote:
Originally Posted by dtan05
i'll pay someone 20$ to get this working on stars and FTP for me. thanks.
what problems are you having?

Plus the two things often overlooked:
no Aero themes if using Windows. Try Classic
no oversized DPI. use standard 100%
Poker Shortcuts: Software that makes playing on Poker Stars and Full Tilt Poker EASIER! Quote

      
m