View Single Post
  #32  
Old 09-20-2007, 04:20 PM
highwayfrog highwayfrog is offline
Junior Member
 
Join Date: Sep 2006
Posts: 10
Default Re: PStars Grabber (New AHK script)

Hi.
I made a copy of ur script to a notepad.
and I put my screenname on cfilename as u said.

; auto-execute

cIHH = Instant Hand History
cPSTable = Afx:400000:28:10011:0:01 ;table of hands in the IHH window
cSrch = `'
cFileName = C:\Program Files\PokerStars\HandHistory\goldfish1144\CurrData
cSleep = 600000 ;set to 10 min -- change the time interval here
lastGameID = 0


; start IHH grabber loop

loop
{
prevTableName:=
prevGameID:=
WinActivate, %cIHH%
Control,Choose,1,ComboBox1,%cIHH%
ControlFocus, %cPSTable%,%cIHH%
If (lastGameID = 0)
{
Send {PgUp 10}
}
else
{
GoSub FindLastGameID
}
FileID := A_Index
Loop
{
WinActivate, %cIHH%
ControlGetText,History,Edit2,%cIHH%
Loop, Parse, History, `n
{
IfEqual, A_Index,3, break
aHistData%A_Index% = %A_LoopField%
}
Pos := InStr(aHistData2,cSrch,0,0)
StringMid,TableName,aHistData2,8,(Pos-8)
StringMid,GameID,aHistData1,18,10
If (TableName = prevTableName) and (GameID = prevGameID)
break
prevTableName:= TableName
prevGameID:= GameID
FileAppend,
(
%History%
),%cFileName%%FileID%.txt
WinActivate, %cIHH%
ControlFocus, %cPSTable%,%cIHH%
Send {Down}
}
lastGameID := (prevGameID - 10000)
WinMinimizeAll
Sleep, %cSleep%

}
return



; Finds last hand from previous loop
FindLastGameID:
ControlGetText,History,Edit2,%cIHH%
StringMid,GameID,History,18,10
Loop
{
If (GameID > lastGameID)
{
Send {PgUp 4}
break
}
else
{
Send {PgDn 2}
ControlGetText,History,Edit2,%cIHH%
StringMid,GameID,History,18,10
}
}
return

--- END SCRIPT ---

Then I clicked autoit to open this script.
Autoit popup says "Unterminated string in file C:\Documents and settings \Desktop\ps.auto3-new.txt,line9"

Can anybody help me?

Tx
Reply With Quote