View Single Post
  #4  
Old 11-24-2007, 09:24 PM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: simple script for stars: help please

This *might* work

;---------------------------------
~RButton::
F4::
;WinGet,id,,A
MouseGetPos,,, curWin
WinGetTitle, title, ahk_id%curWin%

IfInString, title, No Limit Hold'em
{
Slash := Instr(title, "/") + 2
Space := Instr(title, " ", false, Slash)-2
BBLength := Space - Slash
StringMid, Bigblind, title, Slash, BBLength
Transform, RaiseAmount, Round, Bigblind * 2.5

MouseGetPos,,, curWin
ControlSetText, PokerStarsSliderEditorClass1, %RaiseAmount%, ahk_id%curWin%
}
return
;---------------------------------

note the -2 on the line "Space := Instr(title, " ", false, Slash)-2" - it is all I added, and is a guess. This number may need editing up or down.

The last update removed the space before "- Logged in as XXXX", so I suspect your code is matching the space after the "-", leading to problems with calculations.

Just a guess, I've not yet fixed my own code [img]/images/graemlins/frown.gif[/img]

dave.

EDIT: Your original code *should* stll work once Antes are introduced (mine does) - you will probably need to check if(Instr(title, "Ante")) {use old method}
Reply With Quote