Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

New Ipoker Update - Bet Pot Script & Holdem Manager

  • 09-04-2008 7:12pm
    #1
    Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭


    Ipoker seemed to have done an update where they changed the slider bar to include bet pot, bet 1/2 pot buttons, Min bet, 1x 2x etc but the bet pot script dosent work. If anyone finds a new working one id appreciate a link as im rarely on 2+2, also some sites changed their HH xml causing some files not to import but the newest version 1.05.01 will fix this and its due out in the next hour so im told.


    Also before if you had previously bet 10 and tried to RR it would raise that amount + the bet in front of you, now if you raise 30 when theres 10 in front of you it will only raise to 30 instead of the previous 40 if that makes sense which i doubt:rolleyes:


Comments

  • Registered Users, Registered Users 2 Posts: 10,894 ✭✭✭✭phantom_lord


    so instead of fixing all the obvious issues, they spruce up the slider bar? gg ipoker.

    edit: i guess fixing that raise bug is nice tho.


  • Closed Accounts Posts: 27 MadDonna


    edit: i guess fixing that raise bug is nice tho.[/quote]

    Another nice fix is sending shyte to Poker Tracker. Apparently I am +$2k today (although my roll has only gone up by $1050 and also I have generated -$2476 in rakeback. That means at 40% I owe iPoker just under $1k. Perhaps they can use that to undo this mess.

    Perhaps some TESTING might have been a good idea rather than testing it in live? Twats.


  • Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭dvdfan


    Heres the link for the fix

    www.rvgsoftware.com/hm/hmtestupdate.exe


  • Registered Users, Registered Users 2 Posts: 9,472 ✭✭✭AdMMM


    It's not iPokers fault that third party programmes don't work with the new update (yet).

    Update is a bit strange, I would have thought they had more pressing issues to attend to.


  • Registered Users, Registered Users 2 Posts: 3,193 ✭✭✭Macspower


    this betting bar is a dissaster... fish who had no idea how to bet sizre and now pressing pot on every street!!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,513 ✭✭✭RoadSweeper


    Thats a good thing if your good.


  • Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭dvdfan


    It seems that eyepoker, bet pot script and musos converter have all stopped working now aswell.:mad:

    Its not that HM wont import the hands eyepoker isnt even writing the HH to the hard drive most likely because of the changed HH format so no datamining until they get it sorted.


  • Closed Accounts Posts: 3,163 ✭✭✭Slash/ED


    It has to be said though...I do much prefer the raises done this way...


  • Registered Users, Registered Users 2 Posts: 3,193 ✭✭✭Macspower


    Thats a good thing if your good.


    It can have an advantage if you have a monster...

    however most bad players had no idea how to bet size and repeadely gave you odds to draw to your flush/str8 making it very profitable....

    they are now mashing the pot button


  • Moderators, Science, Health & Environment Moderators Posts: 9,016 Mod ✭✭✭✭mewso


    I'm going to have a look at this this evening after work. Thanks for the headsup dvdfan.


  • Advertisement
  • Closed Accounts Posts: 3,163 ✭✭✭Slash/ED


    Macspower wrote: »
    It can have an advantage if you have a monster...

    however most bad players had no idea how to bet size and repeadely gave you odds to draw to your flush/str8 making it very profitable....

    they are now mashing the pot button

    Ah but hours and hours of live experience and hearing the regs scream "poh" on every street means we should be used to this kind of carry on...


  • Registered Users, Registered Users 2 Posts: 6,854 ✭✭✭zuutroy


    The script Roadsweeper posted in another thread is working fine.


  • Registered Users, Registered Users 2 Posts: 4,039 ✭✭✭Theresalwaysone


    Pot pot pot pot potpotpotpot pot pot potpotpot potpotpotpot


    *to the tune of "oompa loompa" getting progessively louder and more aggressive.


  • Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭dvdfan


    zuutroy wrote: »
    The script Roadsweeper posted in another thread is working fine.


    Not on Carlos for me, it will sort of work but it 1/2 pots it instead of potting it and the scroll thingy dosent work at all for me, what site you on and have you got the new slider with min 2x, pot buttons etc?


  • Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭dvdfan


    Pot pot pot pot potpotpotpot pot pot potpotpot potpotpotpot


    *to the tune of "oompa loompa" getting progessively louder and more aggressive.

    Thats actually hard to do, bit of tongue twisting, i kept starting off with oomp instead of pot no matter how hard i tried a:p Maybe im a bit mad though


  • Registered Users, Registered Users 2 Posts: 6,854 ✭✭✭zuutroy


    I'm on Carlos, and now you mention it, the scroll wheel doesnt work...


  • Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭dvdfan


    zuutroy wrote: »
    I'm on Carlos, and now you mention it, the scroll wheel doesnt work...

    Weird, when i try to right click it raises to $3 in $1/$2, of course we have the new pot button on ipoker now but if you use it when your in the blinds it only raises to $5 for some reason


  • Registered Users Posts: 991 ✭✭✭ZZR1100


    same here . scroll wheel not working and eventhough they have they have the bet pot button now, a right click was much handier.
    any1 who gets news of a fix post here.


  • Closed Accounts Posts: 834 ✭✭✭peeko




  • Moderators, Science, Health & Environment Moderators Posts: 9,016 Mod ✭✭✭✭mewso


    Hand converter should work now. Not 100% on pot sizes throughout the hand but it should work for the most part. The change in the xml file format is ridiculous and the only reason for it would be to piss off third party developers as far as I can see.


  • Advertisement
  • Closed Accounts Posts: 119 ✭✭acetking


    My bet pot now only puts me Allin every time i use it WTF ?


  • Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭dvdfan


    acetking wrote: »
    My bet pot now only puts me Allin every time i use it WTF ?

    Can you PM when your sitting at the table next:p

    Cheers Muso wp


  • Registered Users, Registered Users 2 Posts: 281 ✭✭cokedrinker


    New version of eyepoker (v1.57) has just now been released which sorts out the datamining problem. Only hands with no action were being imported correctly - 0% VPIPs for all players datamined this weekened in HM... any idea on how i can remove all hands datamined this weekend from my db, as it obviously skews my vpip stats on people :/

    Also, any update on a working betpot script?


  • Closed Accounts Posts: 119 ✭✭acetking


    lol ;)


  • Closed Accounts Posts: 1,019 ✭✭✭HoLLLLLaments


    so is there a working bet pot script?


  • Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭dvdfan


    Not that i know of, ive got used to the bet pot button Preflop but post flop i just type in now and ive kinda got used to it too. I only 4 table but id imagine its a head wrecker if your 8tabling+


  • Registered Users, Registered Users 2 Posts: 281 ✭✭cokedrinker


    scroll to hoobees quote for new betpot http://forumserver.twoplustwo.com/showthread.php?t=1581&page=47

    doesnt seem to work for me, but atleast scroll wheel works :/


  • Closed Accounts Posts: 3,163 ✭✭✭Slash/ED


    dvdfan wrote: »
    Not that i know of, ive got used to the bet pot button Preflop but post flop i just type in now and ive kinda got used to it too. I only 4 table but id imagine its a head wrecker if your 8tabling+

    The only problem with the button is it's always wrong when you're in the blinds for some reason...


  • Registered Users, Registered Users 2 Posts: 2,953 ✭✭✭dvdfan


    Slash/ED wrote: »
    The only problem with the button is it's always wrong when you're in the blinds for some reason...


    Yeah me too, lucky im a nit out of the blinds


  • Advertisement
  • Closed Accounts Posts: 1,019 ✭✭✭HoLLLLLaments


    this script works on greenjokerpoker but doesnt on betfred? anyone have any ideas why? it calculates the pot but types that number in the chat box as opposed to the bet box. Anyone good with scripts?




    ; ====================
    ; SCRIPT SETTINGS 1
    ; ====================
    #NoEnv
    #Persistent
    #SingleInstance, Force
    ; ====================
    ; USER SETTINGS
    ; ====================
    ; Mouse Wheel Unit
    ;
    ; The amount your bet changes up or down
    ; when you scroll the wheel. This value
    ; can be either the words sb or bb, or a
    ; number, e.g. 0.50 or 10
    WheelUnit = bb
    ;
    ; White Betting Box
    ;
    ; Set this value to 1 if the background of the
    ; box where you type in your bets is white.
    ; Change this to 0 if the background is NOT white.
    ; If you don't have a white background the script
    ; may send the betting amount to the chat-box if
    ; you act out of turn, no matter of this setting.
    ; (Note 1: White means the exact color 0xFFFFFF.)
    ; (Note 2: This setting has no effect if the area
    ; behind the betting box is always white.)
    WhiteBetBox := 1
    ;
    ; Buttons On Left
    ;
    ; This option is only for those of you playing
    ; at a skin where the Action-buttons (Fold, Call,
    ; Raise) and the box where you type in your bets
    ; is more to the left than most skins.
    ; If you do, set this option to 1.
    ; The only skin I know so far that this applies
    ; to is BetFred Poker.
    ; The default is 0 (zero).
    ; This setting ONLY effects full view.
    ButtonsOnLeft := 0
    ; ====================
    ; ERROR CHECK USER SETTINGS
    ; ====================
    If (WheelUnit != "sb" AND WheelUnit != "bb")
    If WheelUnit Is Not Number
    {
    MsgBox, 16, Configuration error,
    (LTrim
    Check the 'User settings'-section at the top of the script.
    The variable WheelUnit must be either the words sb or bb or a number.
    )
    ExitApp
    }
    ;
    If (WhiteBetBox != 0 AND WhiteBetBox != 1)
    {
    MsgBox, 16, Configuration error,
    (LTrim
    Check the 'User settings'-section at the top of the script.
    The variable WhiteBetBox must be 1 for a white betting
    box background and 0 for a non-white betting box background.
    )
    ExitApp
    }
    ;
    If (ButtonsOnLeft != 0 AND ButtonsOnLeft != 1)
    {
    MsgBox, 16, Configuration error,
    (LTrim
    Check the 'User settings'-section at the top of the script.
    The variable ButtonsOnLeft must be 0 for most skins and 1
    ONLY for those skins that have Action buttons more to the
    left, like for example BetFred Poker.
    )
    ExitApp
    }
    ;
    ; ====================
    ; SCRIPT SETTINGS 2
    ; ====================
    SetBatchLines, -1
    SetKeyDelay, -1
    SetMouseDelay, -1
    SetWinDelay, -1
    SetTitleMatchMode, 2
    SendMode, Input
    CoordMode, Mouse, Screen
    CoordMode, Pixel, Screen
    ; ====================
    ; GLOBAL VARIABLES
    ; ====================
    SysGet, Sb, 7
    SysGet, Sc, 4
    TableSize := 0
    PotTextColor := 0x0
    CallTextColor := 0x0
    RaiseTextColor := 0x0
    MouseX := 0
    MouseY := 0
    BetSize := 0
    ButtonOffset := -18*ButtonsOnLeft
    ; ====================
    Return
    ; HOT KEYS
    ; ====================
    ; Right Mouse Button
    ;
    ~RButton::
    BetPot()
    Return
    ;
    ; Mouse Wheel Up
    ;
    ~WheelUp::
    ChangeBet(1)
    Return
    ;
    ; Mouse Wheel Down
    ;
    ~WheelDown::
    ChangeBet(-1)
    Return
    ;
    ; ====================
    ; MAIN FUNCTIONS
    ; ====================
    ; Bet Pot
    ;
    ; Sets the betting box to a pot size bet.
    BetPot()
    {
    global
    Id := GetTableId()
    If (NOT Id)
    Return

    TableSize := GetTableSize(Id)
    If (NOT TableSize)
    Return

    If (WhiteBetBox AND NOT WhiteBetBoxVisible())
    Return

    PotTextColor := GetPotTextColor()
    PotLocationFound := GetPotLocation()
    If (NOT PotLocationFound)
    Return

    PotSize := GetPotSize()
    If (NOT PotSize)
    Return

    CallTextColor := GetCallTextColor()

    CallLocationFound := GetCallLocation()
    If (CallLocationFound)
    CallSize := GetCallSize()
    Else
    CallSize := 0

    BetSize := FormatBet(PotSize + 2*CallSize)

    SaveMousePos()
    SetBet(BetSize)
    RestoreMousePos()
    }
    ;
    ; Change Bet
    ;
    ; Changes the bet by the parameter unit multiplied
    ; by WheelUnit, as specified at the top of the script
    ChangeBet(unit)
    {
    global
    Id := GetTableId()
    If (NOT Id)
    Return

    TableSize := GetTableSize(Id)
    If (NOT TableSize)
    Return

    If (WhiteBetBox AND NOT WhiteBetBoxVisible())
    Return

    RaiseTextColor := GetRaiseTextColor()

    RaiseLocationFound := GetRaiseLocation()
    If (NOT RaiseLocationFound)
    Return

    RaiseSize := GetRaiseSize()
    If (NOT RaiseSize)
    Return


    If WheelUnit Is Number
    {
    BetSize := FormatBet(RaiseSize + unit*WheelUnit)
    } Else
    {
    Blind := GetBlind(Id,WheelUnit)
    BetSize := FormatBet(RaiseSize + unit*Blind)
    }

    SaveMousePos()
    SetBet(BetSize)
    RestoreMousePos()
    }
    ;
    ; ====================
    ; HELP FUNCTIONS
    ; ====================
    ; Get Table Id
    ;
    ; Returns the unique ID number of the window under
    ; the mouse if it is a iPoker table. If it is not
    ; the return value is zero.
    GetTableId()
    {
    MouseGetPos, ,,id
    WinGet, id, ID, - ahk_id %id% ahk_class PTIODEVICE
    Return id
    }
    ;
    ; Get Table Size
    ;
    ; Returns the position and size of a iPoker table.
    ; The size can take on one of three values, 1 for
    ; a full view table, 2 for a mini view table and
    ; 0 if the table size could not be determined.
    ; The parameter is the unique ID number of a table-
    ; window.
    GetTableSize(id)
    {
    global Vx,Vy,Sb,Sc
    WinGetPos, Vx,Vy,Width,Height, ahk_id %id%
    Vx += Sb
    Vy += Sb+Sc
    Width -= (2*Sb)
    Height -= (2*Sb+Sc)

    If Width Between 798 And 802
    If Height Between 598 And 602
    Return 1

    If Width Between 510 And 514
    If Height Between 322 And 326
    Return 2

    Return 0
    }
    ;
    ; White Bet Box Visible
    ;
    ; Self-explanatory.
    ; Returns True if a White Betting Box is visible,
    ; otherwise it returns False.
    WhiteBetBoxVisible()
    {
    global TableSize,Vx,Vy
    If (TableSize = 1)
    {
    PixelSearch, ,,Vx+557,Vy+462,Vx+601,Vy+472, 0xFFFFFF, 0, RGB
    If (ErrorLevel = 0)
    Return True
    Else
    Return False
    }
    If (TableSize = 2)
    {
    PixelSearch, ,,Vx+401,Vy+266,Vx+436,Vy+272, 0xFFFFFF, 0, RGB
    If (ErrorLevel = 0)
    Return True
    Else
    Return False
    }
    Return False
    }
    ;
    ; Get Pot Text Color
    ;
    ; Self-explanatory.
    GetPotTextColor()
    {
    global
    If (TableSize = 1)
    {
    Return % GetOddColor(Vx+359,Vy+131,40,8)
    }
    If (TableSize = 2)
    {
    Return % GetOddColor(Vx+51,Vy+28,24,12)
    }
    Return 0
    }
    ;
    ; Get Call Text Color
    ;
    ; Self-explanatory.
    GetCallTextColor()
    {
    global
    If (TableSize = 1)
    {
    Return % GetOddColor(Vx+414+ButtonOffset,Vy+513,24,12)
    }
    If (TableSize = 2)
    {
    Return % GetOddColor(Vx+296,Vy+293,24,12)
    }
    Return 0
    }
    ;
    ; Get Raise Text Color
    ;
    ; Self-explanatory.
    GetRaiseTextColor()
    {
    global
    If (TableSize = 1)
    {
    Return % GetOddColor(Vx+541+ButtonOffset,Vy+513,24,12)
    }
    If (TableSize = 2)
    {
    Return % GetOddColor(Vx+386,Vy+293,24,10)
    }
    Return 0
    }
    ;
    ; Get Pot Size
    ;
    ; Self-explanatory.
    GetPotSize()
    {
    global Px,Py,Pw,Ph,PotTextColor
    If (Ph = 10)
    {
    GetTextMatrix("st",Px,Py,Pw,Ph,PotTextColor)
    Return % ParseSmallTextMatrix()
    }
    Return 0
    }
    ;
    ; Get Call Size
    ;
    ; Self-explanatory.
    GetCallSize()
    {
    global Cx,Cy,Cw,Ch,CallTextColor
    If (Ch = 11)
    {
    GetTextMatrix("lt",Cx,Cy,Cw,Ch,CallTextColor)
    Return % ParseLargeTextMatrix()
    } Else If (Ch = 10)
    {
    GetTextMatrix("st",Cx,Cy,Cw,Ch,CallTextColor)
    Return % ParseSmallTextMatrix()
    }
    Return 0
    }
    ;
    ; Get Raise Size
    ;
    ; Self-explanatory.
    GetRaiseSize()
    {
    global Rx,Ry,Rw,Rh,RaiseTextColor
    If (Rh = 11)
    {
    GetTextMatrix("lt",Rx,Ry,Rw,Rh,RaiseTextColor)
    Return % ParseLargeTextMatrix()
    } Else If (Rh = 10)
    {
    GetTextMatrix("st",Rx,Ry,Rw,Rh,RaiseTextColor)
    Return % ParseSmallTextMatrix()
    }
    Return 0
    }
    ;
    ; Get Blind
    ;
    ; Returns the big or small blind.
    ; The type parameter can be "bb" or "sb".
    GetBlind(id,type)
    {
    WinGetTitle, title, ahk_id %id%
    If InStr(title, "/$") {
    StringGetPos, s1, title, $
    StringGetPos, s2, title, $,, s1+1
    StringGetPos, s3, title, %A_Space%,, s2
    If (s3 = -1) {
    StringLen, s3, title
    }
    StringMid, sb, title, s1+2,s2-s1-2
    StringMid, bb, title, s2+2,s3-s2-1
    } Else {
    StringLen, len, title
    StringGetPos, s1, title, /
    StringGetPos, s2, title, %A_Space%, R, len-s1
    StringGetPos, s3, title, %A_Space%,, s1
    If (s3 = -1) {
    s3 := len
    }
    StringMid, sb, title, s2+2,s1-s2-1
    StringMid, bb, title, s1+2,s3-s1-1
    }
    StringReplace, sb, sb, `,,
    StringReplace, bb, bb, `,,

    val := %type%
    If val Is Not Number
    Return 0

    Return val
    }
    ;
    ; Format Bet
    ;
    ; Returns 0 if the parameter is less than 0,
    ; otherwise it formats the input so that it has
    ; 2 decimals if it is a floating point.
    ; Integers are not altered.
    FormatBet(bet)
    {
    If (bet < 0)
    Return 0

    If bet Is Float
    {
    OldFormat := A_FormatFloat
    SetFormat, Float, 0.2
    bet += 0.0
    SetFormat, Float, %OldFormat%
    }
    Return bet
    }
    ;
    ; Set Bet
    ;
    ; Sets the betting box at the iPoker table
    ; to be the specified parameter.
    SetBet(bet)
    {
    global TableSize,Vx,Vy,ButtonOffset
    If (TableSize = 1)
    MouseMove, Vx+597+ButtonOffset,Vy+472
    Else If (TableSize = 2)
    MouseMove, Vx+432,Vy+270
    Else
    Return

    Click, Left 2
    Send, %bet%
    }
    ;
    ; Save Mouse Position
    ;
    SaveMousePos()
    {
    global MouseX,MouseY
    MouseGetPos, MouseX,MouseY
    }
    ;
    ; Restore Mouse Position
    ;
    RestoreMousePos()
    {
    global MouseX,MouseY
    MouseMove, MouseX,MouseY
    }
    ;
    ; ====================
    ; COLOR & PIXEL FUNCTIONS
    ; ====================
    ; Here follows a more detailed explanation of how this script works. I have chosen to write
    ; this section mostly because I am more interested in the technical aspects of this script
    ; than its functionality. Also, if someone out there tries to modify this script it will
    ; be a lot easier if I provide comments here.
    ;
    ; Basically what this script does is read the color of each pixel in a specific area and
    ; match the result to a known color, thus extracting only wanted pixels.
    ; These pixels can then be matched to a known pattern to produce numbers.
    ;
    ; STEP 1:
    ; Identify the color of the text.
    ; This is done by the help of the GetOddColor-method. What this method does is extract
    ; the color in a specified area, which differs the MOST from the average color in that
    ; area. If the area only consist of 2 colors it will yield the one with the least amount
    ; of pixels.
    ;
    ; STEP 2:
    ; Locate the pot-, call- and/or raise-text on screen.
    ; Here we use the GetColorBounds-method. This method gives us the bounding rectangle of
    ; a specific color within a specific area. In other words, it gives us the smallest
    ; possible rectangle that contains ALL the pixels of the input-color within the input-area.
    ;
    ; STEP 3:
    ; Retrieve the pot/call/raise text
    ; This is done in two steps:
    ; Step 3.A) Read the pixel color of every pixel within the area from Step 2.
    ; Getting the pixel information is a piece of cake. Storing it in a way that makes sense
    ; is somewhat harder. What I have chosen to do is to store each pixel that corresponds to
    ; my text color as a 1 and each pixel that doesn't as a 0.
    ; I store the information in a numbered variable for each pixel column in the area.
    ; This variable is made to 0 before start and then I use bitwise-or to change the
    ; corresponding bit in the variable to a 1.
    ; The method GetTextMatrix is used for this step.
    ; Step 3.B) Transform this pixel information into numbers
    ; This is the step that probably makes the least sense when looking at the code, but once
    ; you know what bits are and how they are used it's pretty easy.
    ; From the last step we have all the information needed stored as arrays of 1's and 0's,
    ; but how? Well, the information is really not interpreted as an array of 1's and 0's,
    ; but instead as an integer. If you are familiar with computer arithmetic you know that!
    ; We can then simply figure out what value each column must take to match a certain number
    ; and Tada!, we have our number!
    ; Let's take the number 4 as an example:
    ; Here is how it is stored in step 3.A (assuming Tahoma 11pts):
    ; Column 1: 00011000
    ; Column 2: 00101000
    ; Column 3: 01001000
    ; Column 4: 11111111
    ; Column 5: 00001000
    ; If this makes no sense, let's turn it, flip it and change the 1's and 0's to something pretty:
    ; Column: 54321
    ; ---M-
    ; --MM-
    ; -M-M-
    ; M--M-
    ; MMMMM
    ; ---M-
    ; ---M-
    ; It's a freaking four!!
    ; If we now go back to the columns we note that each column is a binary number. Some simple
    ; binary arithmetic gives us:
    ; 00011000 = 24,
    ; 00101000 = 40,
    ; 01001000 = 72,
    ; 11111111 = 255,
    ; 00001000 = 8
    ; And these are the numbers we use to match the columns in the ParseSmallText.
    ; The ParseLargeText-method works exactly the same, but for use with Tahoma, 12pts bold.
    ;
    GetOddColor(X,Y,Width,Height)
    {
    odd_color := 0
    colors := ""
    reds := 0x0
    greens := 0x0
    blues := 0x0
    count := 0
    Loop, %Width%
    {
    sx := X+A_Index-1
    Loop, %Height%
    {
    sy := Y+A_Index-1
    PixelGetColor, px_color, sx,sy, RGB

    If (NOT InStr(colors,px_color))
    {
    px_r := SubStr(px_color, 1, 4)
    px_g := "0x" . SubStr(px_color, 5, 2)
    px_b := "0x" . SubStr(px_color, 7, 2)

    reds += px_r
    greens += px_g
    blues += px_b

    colors := colors . "`n" . px_color
    count++
    }
    c%px_color%++
    }
    }
    red_avg := reds / count
    green_avg := greens / count
    blue_avg := blues / count

    StringTrimLeft, colors, colors, 1

    If (StrLen(colors) < 20)
    {
    min_px_count := 99999
    Loop, Parse, colors, `n
    {
    If (A_LoopField != "")
    {
    If (c%A_LoopField% < min_px_count)
    {
    min_px_count := c%A_LoopField%
    odd_color := A_LoopField
    }
    }
    }
    Return odd_color
    }

    max_variation := 0

    Loop, Parse, colors, `n
    {
    If (A_LoopField != "")
    {
    px_r := SubStr(A_LoopField, 1, 4)
    px_g := "0x" . SubStr(A_LoopField, 5, 2)
    px_b := "0x" . SubStr(A_LoopField, 7, 2)

    SetFormat, Integer, D
    px_r += 0
    px_g += 0
    px_b += 0

    red_var := Sqrt( (red_avg - px_r)**2 )
    green_var := Sqrt( (green_avg - px_r)**2 )
    blue_var := Sqrt( (blue_avg - px_r)**2 )

    variation := (red_var + green_var + blue_var) / 3
    If (variation > max_variation)
    {
    max_variation := variation
    odd_color := A_LoopField
    }
    c%A_LoopField% := 0
    }
    }
    Return odd_color
    }
    ;
    ; Get Pot Location
    ;
    ; Returns the boundaries for the rectangle
    ; around the Pot size-text
    GetPotLocation()
    {
    global TableSize,Vx,Vy,PotTextColor,Px,Py,Pw,Ph
    If (TableSize = 1)
    {
    PotFound := GetColorBounds("P",Vx+403,Vy+127,90,16,PotTextColor)
    If (NOT PotFound)
    Return False

    Pw++
    If (Ph = 11)
    Ph--
    Else If (Ph = 10)
    Py--
    Else If (Ph = 9)
    Ph++
    Else If (Ph = 8)
    {
    Ph += 2
    Py--
    } Else
    Return False

    Return True
    }
    If (TableSize = 2)
    {
    PotFound := GetColorBounds("P",Vx+45,Vy+28,58,12,PotTextColor)
    If (NOT PotFound)
    Return False

    Pw++
    If (Ph = 11)
    Ph--
    Else If (Ph = 10)
    Py--
    Else If (Ph = 9)
    Ph++
    Else If (Ph = 8)
    {
    Ph += 2
    Py--
    } Else
    {
    Px := 0
    Py := 0
    Pw := 0
    Ph := 0
    Return False
    }

    Return True
    }
    Return False
    }
    ;
    ; Get Call Location
    ;
    ; Returns the boundaries for the rectangle
    ; around the Call size-text
    GetCallLocation()
    {
    global TableSize,Vx,Vy,ButtonOffset,CallTextColor,Cx,Cy,Cw,Ch
    If (TableSize = 1)
    {
    CallFound := GetColorBounds("C",Vx+386+ButtonOffset,Vy+510,80,18,CallTextColor)
    If (NOT CallFound)
    Return False

    Cx--
    Cw += 2

    If (Ch = 13)
    {
    Cy++
    Ch -= 2
    } Else If (Ch = 12 OR Ch = 11)
    {
    Ch--
    } Else If (Ch = 9 OR Ch = 8)
    {
    Cy--
    Ch += 2
    } Else
    {
    Cx := 0
    Cy := 0
    Cw := 0
    Ch := 0
    Return False
    }

    Return True
    }
    If (TableSize = 2)
    {
    CallFound := GetColorBounds("C",Vx+270,Vy+292,77,18,CallTextColor)
    If (NOT CallFound)
    Return False

    Cx--
    Cw += 2
    If (Ch = 11)
    Ch--
    Else If (Ch = 10)
    Cy--
    Else If (Ch = 9)
    Ch++
    Else If (Ch = 8)
    {
    Ch += 2
    Cy--
    } Else
    {
    Cx := 0
    Cy := 0
    Cw := 0
    Ch := 0
    Return False
    }

    Return True
    }
    Return False
    }
    ;
    ; Get Raise Location
    ;
    ; Returns the boundaries for the rectangle
    ; around the Raise size-text
    GetRaiseLocation()
    {
    global TableSize,Vx,Vy,ButtonOffset,RaiseTextColor,Rx,Ry,Rw,Rh
    If (TableSize = 1)
    {
    RaiseFound := GetColorBounds("R",Vx+513+ButtonOffset,Vy+510,80,18,RaiseTextColor)
    If (NOT RaiseFound)
    Return False

    Rx--
    Rw += 2
    If (Rh = 13)
    {
    Ry++
    Rh -= 2
    } Else If (Rh = 12 OR Rh = 11)
    {
    Rh--
    } Else If (Rh = 9 OR Rh = 8)
    {
    Rh += 2
    Ry--
    } Else
    {
    Rx := 0
    Ry := 0
    Rw := 0
    Rh := 0
    Return False
    }

    Return True
    }
    If (TableSize = 2)
    {
    RaiseFound := GetColorBounds("R",Vx+360,Vy+292,77,12,RaiseTextColor)
    If (NOT RaiseFound)
    Return False

    Rx--
    Rw += 2
    If (Rh = 11)
    Rh--
    Else If (Rh = 10)
    Ry--
    Else If (Rh = 9)
    Rh++
    Else If (Rh = 8)
    {
    Rh += 2
    Ry--
    } Else
    {
    Rx := 0
    Ry := 0
    Rw := 0
    Rh := 0
    Return False
    }

    Return True
    }
    Return False
    }
    ;
    ; Get Color Bounds
    ;
    ; Calculates the smallest possible rectangle
    ; that encloses all the pixels within the
    ; provided area of the provided color.
    ; The result is stored in variables with the
    ; provided prefix.
    GetColorBounds(prefix,X,Y,Width,Height,Color)
    {
    global
    local min_x,max_x,min_y,max_y,i
    min_x := 9999
    max_x := 0
    min_y := 9999
    max_y := 0
    Loop, %Width%
    {
    i := A_Index - 1
    PixelSearch, ,, X+i,Y,X+i,Y+Height-1, %Color%, 0, RGB
    If (ErrorLevel = 0)
    {
    If (i < min_x)
    min_x := i
    If (i > max_x)
    max_x := i
    }
    }
    If (min_x >= max_x OR max_x = 9999)
    {
    %prefix%x := 0
    %prefix%y := 0
    %prefix%w := 0
    %prefix%h := 0
    Return False
    }
    %prefix%x := X + min_x
    %prefix%w := max_x - min_x + 1

    Loop, %Height%
    {
    i := A_Index - 1
    PixelSearch, ,, %prefix%x,Y+i,%prefix%x+%prefix%w,Y+i, %Color%, 0, RGB
    If (ErrorLevel = 0)
    {
    If (i < min_y)
    min_y := i
    If (i > max_y)
    max_y := i
    }
    }
    If (min_y >= max_y OR max_y = 9999)
    {
    %prefix%x := 0
    %prefix%y := 0
    %prefix%w := 0
    %prefix%h := 0
    Return False
    }
    %prefix%y := Y + min_y
    %prefix%h := max_y - min_y + 1

    Return True

    }
    ;
    ; Get Text Matrix
    ;
    ; Returns a matrix where each element is a 1
    ; if the corresponding pixel in the provided
    ; area is the provided color. If it is not
    ; the element is 0.
    ; The result is stored in separate variables
    ; for each column of the matrix.
    ; The col-variable contains the number of
    ; columns and the sep-variable contains a string
    ; with each column number in the matrix that
    ; is only zeros.
    ; The variables begin with the provided prefix.
    GetTextMatrix(prefix,X,Y,Width,Height,Color)
    {
    global
    local col,i,j,px_color
    col := 0
    %prefix%_sep := 0
    Loop, %Width%
    {
    col++
    %prefix%_col%col% := 0
    i := A_Index - 1
    Loop, %Height%
    {
    j := A_Index - 1
    PixelGetColor, px_color, X+i,Y+j, RGB
    If (px_color = Color)
    {
    %prefix%_col%col% := %prefix%_col%col% | 2**(Height-j-1)
    }
    }
    If (%prefix%_col%col% = 0)
    {
    %prefix%_sep := %prefix%_sep . "`n" . col
    }
    }
    %prefix%_col := col
    }
    ;
    ; Parse Small Text Matrix
    ;
    ; Parses a text matrix with pixel information.
    ; The font is Tahoma, 11 pts.
    ParseSmallTextMatrix()
    {
    global
    local number,this,next,a,b,c,d,e
    number := ""
    StringSplit, st_sep, st_sep, `n
    If (st_sep0 > 1)
    {
    Loop, %st_sep0%
    {
    If (A_Index = %st_sep0%)
    Break

    this := st_sep%A_Index%
    next := A_Index + 1
    next := st_sep%next%
    If (this = next)
    Continue

    If (this + 2 = next)
    {
    a := this + 1
    a := st_col%a%
    If (a = 6)
    number := number . "."
    }
    If (this + 4 = next)
    {
    a := this + 1
    a := st_col%a% >> 1
    b := this + 2
    b := st_col%b% >> 1
    c := this + 3
    c := st_col%c% >> 1
    If (a = 65 AND b = 255 AND c = 1)
    number := number . "1"
    }
    If (this + 6 = next)
    {
    a := this + 1
    a := st_col%a% >> 1
    b := this + 2
    b := st_col%b% >> 1
    c := this + 3
    c := st_col%c% >> 1
    d := this + 4
    d := st_col%d% >> 1
    e := this + 5
    e := st_col%e% >> 1
    If (a = 67 AND b = 133 AND c = 137 AND d = 145 AND e = 97)
    number := number . "2"
    If (a = 66 AND b = 129 AND c = 145 AND d = 145 AND e = 110)
    number := number . "3"
    If (a = 24 AND b = 40 AND c = 72 AND d = 255 AND e = 8)
    number := number . "4"
    If (a = 242 AND b = 145 AND c = 145 AND d = 145 AND e = 142)
    number := number . "5"
    If (a = 62 AND b = 81 AND c = 145 AND d = 145 AND e = 14)
    number := number . "6"
    If (a = 128 AND b = 131 AND c = 140 AND d = 176 AND e = 192)
    number := number . "7"
    If (a = 110 AND b = 145 AND c = 145 AND d = 145 AND e = 110)
    number := number . "8"
    If (a = 112 AND b = 137 AND c = 137 AND d = 138 AND e = 124)
    number := number . "9"
    If (a = 126 AND b = 129 AND c = 129 AND d = 129 AND e = 126)
    number := number . "0"
    }
    }
    }
    Loop, %st_col%
    {
    st_col%A_Index% := 0
    }
    If number is Number
    Return number

    Return 0
    }
    ;
    ; Parse Large Text Matrix
    ;
    ; Parses a text matrix with pixel information.
    ; The font is Tahoma, 12 pts bold. Although
    ; the digit 2 is missing 1 pixel. Don't ask me
    ; why.
    ParseLargeTextMatrix()
    {
    global
    local number,this,next,a,b,c,d,e,f,g
    number := ""
    StringSplit, lt_sep, lt_sep, `n
    If (lt_sep0 > 1)
    {
    Loop, %lt_sep0%
    {
    If (A_Index = %lt_sep0%)
    Break

    this := lt_sep%A_Index%
    next := A_Index + 1
    next := lt_sep%next%
    If (this = next)
    Continue

    If (this + 3 = next)
    {
    a := this + 1
    a := lt_col%a%
    b := this + 2
    b := lt_col%b%
    If (a = 6 AND b = 6)
    number := number . "."
    }
    If (this + 7 = next)
    {
    a := this + 1
    a := lt_col%a% >> 1
    b := this + 2
    b := lt_col%b% >> 1
    c := this + 3
    c := lt_col%c% >> 1
    d := this + 4
    d := lt_col%d% >> 1
    e := this + 5
    e := lt_col%e% >> 1
    f := this + 6
    f := lt_col%f% >> 1
    If (a = 129 AND b = 129 AND c = 511 AND d = 511 AND e = 1 AND f = 1)
    number := number . "1"
    }
    If (this + 8 = next)
    {
    a := this + 1
    a := lt_col%a% >> 1
    b := this + 2
    b := lt_col%b% >> 1
    c := this + 3
    c := lt_col%c% >> 1
    d := this + 4
    d := lt_col%d% >> 1
    e := this + 5
    e := lt_col%e% >> 1
    f := this + 6
    f := lt_col%f% >> 1
    g := this + 7
    g := lt_col%g% >> 1
    If (a = 193 AND b = 259 AND c = 263 AND d = 269 AND e = 281 AND f = 497 AND g = 225)
    number := number . "2"
    If (a = 130 AND b = 257 AND c = 273 AND d = 273 AND e = 273 AND f = 511 AND g = 238)
    number := number . "3"
    If (a = 24 AND b = 40 AND c = 72 AND d = 136 AND e = 511 AND f = 511 AND g = 8)
    number := number . "4"
    If (a = 2 AND b = 481 AND c = 481 AND d = 289 AND e = 289 AND f = 319 AND g = 286)
    number := number . "5"
    If (a = 126 AND b = 255 AND c = 417 AND d = 289 AND e = 289 AND f = 319 AND g = 30)
    number := number . "6"
    If (a = 256 AND b = 256 AND c = 263 AND d = 287 AND e = 376 AND f = 480 AND g = 384)
    number := number . "7"
    If (a = 238 AND b = 511 AND c = 273 AND d = 273 AND e = 273 AND f = 511 AND g = 238)
    number := number . "8"
    If (a = 240 AND b = 505 AND c = 265 AND d = 265 AND e = 267 AND f = 510 AND g = 252)
    number := number . "9"
    If (a = 254 AND b = 511 AND c = 257 AND d = 257 AND e = 257 AND f = 511 AND g = 254)
    number := number . "0"
    }
    }
    }
    Loop, %lt_col%
    {
    lt_col%A_Index% := 0
    }
    If number is Number
    Return number

    Return 0
    }
    ;
    ; ====================
    ; END OF SCRIPT
    ; ====================


  • Registered Users Posts: 991 ✭✭✭ZZR1100


    bet pot / scrool wheel AHK.
    the version posted above dosnt work for me on carlos


  • Registered Users, Registered Users 2 Posts: 2,364 ✭✭✭Mr. Flibble


    Gold Mine has been updated to work with the new format, should anyone here use it.


Advertisement