View Single Post
  #310  
Old 11-25-2007, 01:22 PM
diggla diggla is offline
Senior Member
 
Join Date: Mar 2007
Posts: 113
Default Re: PokerPad - AHK hotkey script

Excellent script and thanks for your work!

I found a bug with Ongame. There are 2 separators for this network. The '.' is the standard separator for values of >= 1000. 1000 will be displayed as 1.000 in game. There is also a decimal separator which is ',' for my language setting. But PokerPad will interpret a pot size of e.g. 1.864 as 1,86 and a potsize bet would be around $1 instead of $1864.

So you need to differentiate between the separator for 1.000 and the decimal separator.

Here is a workaround if your decimal separator is ',' and values are displayed as e.g. 1.234,56

There is one line added after the ;xxx comment:

<font class="small">Code:</font><hr /><pre>
Ongame_CurrencyToFloat(amount) {
local s := InStr(amount, A_Space) + 1
amount := SubStr(amount, s)
;xxx remove 1.000 separator
StringReplace, amount, amount, .
if Ongame_Separator
StringReplace, amount, amount, % Ongame_Separator, .
return CurrencyToFloat(amount)
}
</pre><hr />
Reply With Quote