Poker obecně
- ROZCESTNÍK (26)
- Rakeback (485)
- HEM1 !! - diskuze (1565)
- 40,000 SnG's Chall (82)
- PokerStars (2554)
- Novela zákona o po (936)
- Ipoker (42)
Multi-table turnaje
- 45 man propbet Apr (69)
- Rail thread (505)
- turbo 180 (732)
- AQo/50E FO FT (2)
- JJ oop 6 max (6)
Všeobecná Sekce
- Fotbal (1972)
- MS v hokeji (249)
- What are you liste (659)
- CZE - SVK Tipovack (18)
- Vtipy (6909)
Přihlášení
Rakeback
- Privátní dealy?
- CardCasino (895) 30,0 %
- PokerHeaven (27) 30,0 %
- Overbet (16) 35,0 %
- ComeOn (3) 33,0 %
- Poker Mambo (163) 30,0 %
- Red Kings (22) ?
- Betfair (66) ?
- Ladbrokes (10) ?
- PokerStars (21) ?
markhand.ahk
Konecne se mi podarilo rozchodit script na markovani hand pomoci klavesove zkratky, tak bych se s vami o tuto funkci chtel podelit, protoze si myslim, ze by ji spousta z vas mohla vyuzit a imho docela usnadni praci.. Funguje pouze na hernach PokerStars a FullTilt v kombinaci s programem Holdem Manager.
Zde je jednoduchy navod:
1. Instalace programu AutoHotkey -> http://www.autohotkey.com/download/ (Installer for AutoHotkey Basic)
2. Zdrojovy kod ze spoileru zkopirovat do notepadu a ulozit pod nazvem "markhand.ahk" (ne markhand.ahk.txt!!!)
#noenv
#SingleInstance, Force
SetWinDelay,-1
settitlematchmode,2
StringTrimRight, thisahk, A_ScriptName, 4
SetWorkingDir %A_ScriptDir%
Menu, Tray, NoStandard
Menu, Tray, Add, Reload, Reload
Menu, Tray, Add, Change Settings, GetMHSettings()
Menu, Tray, Add, Suspend Hotkeys, SuspendHotkey
Menu, Tray, Add, Exit, Exit
Gui, Submit
IniRead, StarsHHLogFolderPath, %thisahk%.ini, LogFolder, StarsHHPath, %A_Space%
IniRead, FullTiltHHLogFolderPath, %thisahk%.ini, LogFolder, FullTiltHHPath, %A_Space%
IniRead, PostgresLogPath, %thisahk%.ini, LogFolder, postgrespath, %A_Space%
IniRead, postgresuser, %thisahk%.ini, LogFolder, postgresuser, %A_Space%
IniRead, postgresdb, %thisahk%.ini, LogFolder, postgresdb, %A_Space%
IniRead, HK_mark, %thisahk%.ini, LogFolder, HK_mark, %A_Space%
IniRead, HK_sql , %thisahk%.ini, LogFolder, HK_sql , %A_Space%
If (!StarsHHLogFolderPath or !FullTiltHHLogFolderPath or !PostgresLogPath or !postgresuser or !postgresdb or !HK_mark or !HK_sql)
gosub GetMHSettings()
HotKey, %HK_mark%, l_markhand
HotKey, %HK_sql%, l_processsql
IfExist, gamenumbers.txt
{
MsgBox, 4,, Delete existing file gamenumbers.txt? (press Yes or No)
IfMsgBox Yes
FileDelete, gamenumbers.txt
}
settimer,checksize,100
return
^2::
Suspend
Return
l_markhand:
winget,id,id,A
wingetclass,class,ahk_id%id%
if class=PokerStarsTableFrameClass
{
site=Stars
dir:=StarsHHLogFolderPath
}
else
if class=QWidget
{
site=FullTilt
dir:=FullTiltHHLogFolderPath
}
else
site=
if site
{
filename:=HHFile(id, dir ,site)
FileGetSize, FileSize, % filename
if !FileSize
FileSize:=0
listadd(filelist, id . "-" . FileSize)
}
return
l_processsql:
IfExist, temp.txt
FileDelete, temp.txt
IfExist, temp.bat
FileDelete, temp.bat
IfExist, %PostgresLogPath%\temp.txt
FileDelete, %PostgresLogPath%\temp.txt
IfExist, %PostgresLogPath%\temp.bat
FileDelete, %PostgresLogPath%\temp.bat
FileRead, numbers, gamenumbers.txt
sql1=Update pokerhands
sql2= Set mark_id = 1
sql3= Where gamenumber =
sql4=AND handtimestamp > localtimestamp - interval '5 days';
sql5=Update pokerhands_hero
Loop, Parse, numbers, `n,
{
if A_loopField
{
FileAppend, %sql1% %sql2% %sql3% %A_loopField% %sql4%`n, temp.txt
FileAppend, %sql5% %sql2% %sql3% %A_loopField% %sql4%`n, temp.txt
}
}
FileAppend, cd %PostgresLogPath%`npsql.exe %postgresdb% %postgresuser% <temp.txt`npause`n, temp.bat
Filemove, temp.txt, %PostgresLogPath%
Filemove, temp.bat, %PostgresLogPath%
run %PostgresLogPath%\temp.bat
return
;-----------------------------------------------------------------------------------------------------
checksize:
Loop, Parse, filelist, `,
{
stringsplit,tab,A_loopField,-
wingetclass,class,ahk_id%tab1%
if class=PokerStarsTableFrameClass
{
site=Stars
dir:=StarsHHLogFolderPath
}
else
if class=QWidget
{
site=FullTilt
dir:=FullTiltHHLogFolderPath
}
filename:=HHFile(tab1, dir ,site)
FileGetSize, FileSize, % filename
if FileSize
if FileSize!=%tab2%
{
num:=gethhnumber(tab1,site)
FileAppend, %num%`n, gamenumbers.txt
listDelItem(filelist, A_loopField)
}
}
return
;-----------------------------------------------------------------------------------------------------
gethhnumber(winid,site)
{
global StarsHHLogFolderPath,FullTiltHHLogFolderPath
if site=Stars
path=%StarsHHLogFolderPath%
else
path=%FullTiltHHLogFolderPath%
hh:=LastHH(winid,path,site)
Loop, Parse, hh, `n
{
if instr(A_loopfield,"Hand #")
{
stringtrimleft,num,A_loopfield,instr(A_loopfield," #")
num := SubStr(num, 2, instr(num, ":") - 2)
break
}
}
return num
}
;-----------------------------------------------------------------------------------------------------
HHFile(win, dir, site) {
if site=Stars
ext=HH
else
ext=FT
title := WinGetTitle(win)
if !(instr(title,"Tournament")>0 OR instr(title,"Sit & Go")>0)
{
stringleft,file,title, InStr(title, "-","",0)-2
file := ext . SubStr(a_now, 1, 8) . A_space . file
StringReplace, file, file, /,-,
if site=Stars
{
StringReplace, file, file, USD -,- USD,
StringReplace, file, file, EUR -,- EUR,
}
}
else
if site=Stars
{
stringtrimleft,file,title,instr(title,"Tournament" )+10
stringleft,file,file,InStr(file, A_space)-1
}
else
{
stringtrimleft,file,title,instr(title,"(")-1
stringleft,file,file,InStr(file, "-")-2
}
loop %dir%\*.txt
{
if instr(A_LoopFileName,file)>0 & !instr(A_LoopFileName,"Summary")>0
return dir "\" A_LoopFileName
}
EnvAdd, date, -1, d
stringleft,file,title, InStr(title, "-","",0)-2
file := ext . SubStr(date, 1, 8) . A_space . file
StringReplace, file, file, /,-,
if site=Stars
{
StringReplace, file, file, USD -,- USD,
StringReplace, file, file, EUR -,- EUR,
}
loop %dir%\*.txt
{
if instr(A_LoopFileName,file)
return dir "\" A_LoopFileName
}
EnvAdd, date, +1, d
stringleft,file,title, InStr(title, "-","",0)-2
file := ext . SubStr(date, 1, 8) . A_space . file
StringReplace, file, file, /,-,
if site=Stars
{
StringReplace, file, file, USD -,- USD,
StringReplace, file, file, EUR -,- EUR,
}
loop %dir%\*.txt
{
if instr(A_LoopFileName,file)
return dir "\" A_LoopFileName
}
}
return
;-----------------------------------------------------------------------------------------------------
LastHH(win, dir, site) {
if site=Stars
hand=PokerStars Hand #
else
game=Full Tilt Poker Game #
file@name:=HHFile(win, dir ,site)
FileRead, hh, %file@name%
if !instr(hh,"seat")
{
FileGetSize file@size, %file@name%
FileRead file@buffer, %file@name%
VarSetCapacity(hh, file@size / 2 + 1, 0)
r := DllCall("WideCharToMultiByte"
, "UInt", 0 ; CodePage: CP_ACP=0 (current Ansi), CP_UTF7=65000, CP_UTF8=65001
, "UInt", 0 ; dwFlags
, "Str", file?buffer ; LPCWSTR lpWideCharStr
, "Int", file@size / 2 ; cchWideChar: -1=null terminated
, "Str", hh ; LPSTR lpMultiByteStr
, "Int", file@size / 2 + 1 ; cbMultiByte: 0 to get required size
, "UInt",0 ; LPCSTR lpDefaultChar
, "UInt", 0) ; LPBOOL lpUsedDefaultChar
}
StringTrimLeft, hh, hh, InStr(hh, hand, "", 0)-1
if instr(hh,"SUMMARY")
Stringleft, hh, hh, InStr(hh, "*** SUMMARY", "", 0)-1
return hh
}
;-----------------------------------------------------------------------------------------------------
WinGetTitle(win) {
WinGetTitle, title, ahk_id%win%
return title
}
;-----------------------------------------------------------------------------------------------------
StrRep(str,char,rep_char="",all=1) {
StringReplace,str,str,%char%,%rep_char%,% all ? "useErrorLevel" : 0
return str
}
;-----------------------------------------------------------------------------------------------------
StarsHHFolderSelect:
FileSelectFolder, SelectedFolder, *%ProgramFiles%\PokerStars\,, Select the folder with the PokerStars handhistory files
Folder := RegExReplace(Folder, "\\$") ; Removes the trailing backslash, if present.
If SelectedFolder <> ;the user selected a folder
{
GuiControl,, StarsHHLogFolderPath, %SelectedFolder%
StarsHHLogFolderPath := SelectedFolder
IniWrite, %StarsHHLogFolderPath%, %thisahk%.ini, LogFolder, StarsHHPath
Gui, Submit, NoHide
}
return
;-----------------------------------------------------------------------------------------------------
FullTiltHHFolderSelect:
FileSelectFolder, SelectedFolder, *%ProgramFiles%\Full Tilt Poker\,, Select the folder with the FullTilt handhistory files
Folder := RegExReplace(Folder, "\\$") ; Removes the trailing backslash, if present.
If SelectedFolder <> ;the user selected a folder
{
GuiControl,, FullTiltHHLogFolderPath, %SelectedFolder%
FullTiltHHLogFolderPath := SelectedFolder
IniWrite, %FullTiltHHLogFolderPath%, %thisahk%.ini, LogFolder, FullTiltHHPath
Gui, Submit, NoHide
}
return
;-----------------------------------------------------------------------------------------------------
PostgresBinFolderSelect:
FileSelectFolder, SelectedFolder, *%ProgramFiles%\PostgreSQL\,, Select the folder with the Postgres binary files
Folder := RegExReplace(Folder, "\\$") ; Removes the trailing backslash, if present.
If SelectedFolder <> ;the user selected a folder
{
GuiControl,, PostgresLogPath, %SelectedFolder%
PostgresLogPath := SelectedFolder
IniWrite, %PostgresLogPath%, %thisahk%.ini, LogFolder, postgrespath
Gui, Submit, NoHide
}
return
;-----------------------------------------------------------------------------------------------------
postgresuserselect:
InputBox, postgresuser,, enter Postgres Username
IniWrite, %postgresuser%, %thisahk%.ini, LogFolder, postgresuser
return
;-----------------------------------------------------------------------------------------------------
postgresdbselect:
InputBox, postgresdb,, enter Postgres Datbase Name
IniWrite, %postgresdb%, %thisahk%.ini, LogFolder, postgresdb
return
;-----------------------------------------------------------------------------------------------------
GetMHSettings():
{
Gui, Add, Text, x10 y5 w120 h20 Center, Select Folder Location
Gui, Add, Text, x140 y5 w150 h20 Center, Folder Location
Gui, Add, Button, x5 y20 w150 h20 gPostgresBinFolderSelect center, Postgres Binary Folder
Gui, Add, Edit, x160 y20 w520 h20 vPostgresLogpath, %PostgresLogpath%
Gui, Add, Button, x5 y40 w150 h20 gStarsHHFolderSelect center, Poker Stars HH Folder
Gui, Add, Edit, x160 y40 w520 h20 vStarsHHLogFolderPath, %StarsHHLogFolderPath%
Gui, Add, Button, x5 y60 w150 h20 gFullTiltHHFolderSelect center, Full Tilt HH Folder
Gui, Add, Edit, x160 y60 w520 h20 vFullTiltHHLogFolderPath, %FullTiltHHLogFolderPath%
Gui, Add, Text, x5 y120 w150 h20 right, Postgres User Name:
Gui, Add, Edit, x160 y120 w100 h20 vpostgresuser, %postgresuser%
Gui, Add, Text, x5 y140 w150 h20 right, Postgres Database:
Gui, Add, Edit, x160 y140 w100 h20 vpostgresdb, %postgresdb%
Gui, Add, Text, x5 y160 w150 h20 right, Hotkey "mark current Hand" :
Gui, Add, HotKey, x160 y160 w100 h20 vHK_mark, %HK_mark%
Gui, Add, Text, x5 y180 w150 h20 right, Hotkey "process sql":
Gui, Add, HotKey, x160 y180 w100 h20 vHK_sql, %HK_sql%
Gui, Add, Button, x360 y180 w40 h30, OK ; The label ButtonOK (if it exists) will be run when the button is pressed.
Gui, Show,, Markhand
return
ButtonOK:
GuiClose:
GuiEscape:
Gui, Submit
IniWrite, %postgresdb%, %thisahk%.ini, LogFolder, postgresdb
IniWrite, %postgresuser%, %thisahk%.ini, LogFolder, postgresuser
IniWrite, %PostgresLogPath%, %thisahk%.ini, LogFolder, postgrespath
IniWrite, %FullTiltHHLogFolderPath%, %thisahk%.ini, LogFolder, FullTiltHHPath
IniWrite, %StarsHHLogFolderPath%, %thisahk%.ini, LogFolder, StarsHHPath
IniWrite, %HK_sql%, %thisahk%.ini, LogFolder, HK_sql
IniWrite, %HK_mark%, %thisahk%.ini, LogFolder, HK_mark
Gui, Destroy
return
}
;-----------------------------------------------------------------------------------------------------
SuspendHotkey:
SendInPut, {CTRLDOWN}2{CTRLUP}
return
;-----------------------------------------------------------------------------------------------------
;-----------------------------------------------------------------------------------------------------
listAdd( byRef list, item, del="," ) {
list:=( list!="" ? ( list . del . item ) : item )
return list
}
;-----------------------------------------------------------------------------------------------------
listDelItem( byRef list, item, del=",") {
ifEqual, item,, return list
list:=del . list . del
StringReplace, list, list, %item%%del%
StringTrimLeft, list, list, 1
StringTrimRight, list, list, 1
return list
}
;-----------------------------------------------------------------------------------------------------
reload:
reload
return
;-----------------------------------------------------------------------------------------------------
Exit:
exitapp
return
;-----------------------------------------------------------------------------------------------------
Soubor markhand.ahk lze taky stahnout odsud:
http://uloz.to/13190892/markhand-zip
heslo: pokergaming
3. Umistit tento soubor do korenoveho adresare disku (jeho adresa bude tedy C:\markhand.ahk - doporuceno, ja mam soubor umisteny jeste v podslozce C:\markhand\markhand.ahk a funguje taky bez problemu)
4. Spustit tento soubor dvojklikem
5. Vyplnit nastaveni dle obrazku ve spoileru (prvni radek zustane stejny, v druhem a tretim nastavit adresu na disku, kam si klient herny uklada hand history - NE konecne umisteni HH po autoimportu do HEMu. Ostatni snad bez komentare).

6. Potvrdit OK -> script se spusti do traye a je pripraven markovat
7. Pri stisknuti prednastavene klavesy (u me je to klavesa "M") se v adresari scriptu automaticky vytvori textovy soubor "gamenumbers.txt" do ktereho se znaci cisla markovanych hand). Po skonceni session stisknete druhou prednastavenou klavesovou zkratku (u me klavesa "Q") a vyskoci DOSovske okno, kde je jen potreba vyplnit heslo postgres databaze (std byva "postgrespass") a oznacene handy se prenesou do SQL databaze. V HM uz pak lze lehce vyfiltrovat "Only Show Marked Hands")
8. V pripade spokojenosti zaslat autorovi nejaky drobak na podporu dobre veci :)
Jeste bych dodal, ze aby program fungoval, je nutne mit behem session spusteny autoimport v HEMu, avsak neni nutne mit zapnuty HUD (coz se mi na nem prave libi).
Nezastiram, ze vse co jsem tady popsal jsem odkoukal z 2+2, ale i tak mi trvalo docela dlouho nez jsem narazil na opravdu funkcni postup (ackoliv je opravdu jednoduchy), proto jsem si rikal, ze by tohle mohlo usetrit cas lamam jako jsem ja :)
Btw doufam ze nevadi, ze jsem kvuli tomu zalozil samostatne vlakno, ale myslim, ze v threadu HM by se to v tom mnozstvi prispevku brzo ztratilo.
http://forumserver.twoplustwo.com/45/software/script-mark-current-hand-845894/
| twitter.com/obr4z | Upraveno 7.2.2012 1:08 by obraz |
GJ, pridano do Rozcestniku. 
| Life of lively to live to life of full life thx to shield battery |
udelalse vsechno podle toho ale stejne to nefunguje proste pri stisknuti klavesy to nic neudela:(
ono to nic nedela po stisku klavesy ;)
| Don't stop me now, I'm having such a good time. |
presne, kdyz pak zmacknu tu databazi tak me to napise ze ten soubor v kterym sou ty handy neexistuje
| I'm not crazy, my mother had me tested. |
funguje to teda nikomu? dost by se mi neco podobnyho hodilo, takze se kdyztak ozvete .. :)
6 - zkus si dát něco s liškou, zkouknout dokument o 11. září, a pak to půjde.... xD
| nice blog, gl |
Na jake herne vam to nefunguje? Ja pouzivam na PS, na FT nehraju, takze nemam odzkouseno.. Pak me jeste napada - jakou pouzivate verzi SQL? Pokud jinou nez 8.4, bude se adresa slozky bin v prvnim radku samozrejme lisit, stejne tak se budou lisit i ty ostatni adresy dle verze windows (viz link na 2+2), tohle je standartni umisteni pro xp. Proste je potreba mit spravne vyplnene to gui rozhrani.. Vytvori se vam po stisknuti markovaci zkratky soubor "gamenumbers.txt" ve slozce s markhand.ahk?
| twitter.com/obr4z |
jede to teda nekomu? mi se to nepodarilo zprovoznit
| One time please!!!!!!! |
Me to funguje a pouzivam to porad ;) Napis mi pm, zkusim ti s tim pomoct..
e: sorry, ted vidim ze uz jsi mi pm psal.. vzdycky to nejak prehlednu, chtelo by to nejak zvyraznit new message..
| twitter.com/obr4z | Upraveno 17.11.2011 18:49 by obraz |
tak se mi to podarilo rozjet na XP i WIN7 a uplna spokojenost
| One time please!!!!!!! |
Nedavno jsem instaloval markhand.ahk na novem pc (win 7) a ten zdrojovy kod ve spoileru funguje nejak spatne, ale sehnal jsem uz novejsi verzi, tak to behem zitrka opravim..
e: zdrojovy kod ve spoileru opraveny + pod spoiler s kodem jsem pridal i hotovou verzi ke stazeni - teoreticky by melo melo stacit tento soubor stahnout - rozbalit - spustit & nastavit a melo by vse fungovat, tuto verzi sam pouzivam a podarilo se mi rozbehnout ji hned napoprve, tak kdo jste s tim meli problem, snad vam tohle bude fungovat..
e2: az budu mit chvilku tak jestli bude zajem, doplnim jeste drobnou upravu jednoho souboru, diky ktere neni potreba zadavat pri kazdem preneseni marknutych hand do databaze heslo (postgrespass)
| twitter.com/obr4z | Upraveno 27.1.2012 20:23 by obraz |
nejak mi to blbne. jede to ale kdyz se maji ukladat cisla hand do toho gamesnumber tak jakoby se ukladali, ale nejsou tam ty cisla tech hand.
nevi nekdo v cem by mohl byt problem? zaclo to blbnout cca pred tydnem +-
zkusil jsem to udelat i znovu s tim novym souborem, ale stejne to nejde.
Nejaky napad? diky
| One time please!!!!!!! |
#13 dela mi to same.. napada me jedine jestli to neni tim poslednim updatem ps, myslim ze se prave nejak menila podoba handhistory a to by na to mohlo mit vliv.. na 2+2 jsem nasel nejake updaty, tak to vyzkousim a dam vedet.. je to kdyztak z toho odkazu na konci #0 pod navodem.
| twitter.com/obr4z | Upraveno 7.2.2012 1:10 by obraz |
Tak ta posledni verze kodu funguje, opraveno ve spoileru i v hotove verzi pro stazeni.
| twitter.com/obr4z |
jede to jak ma. Diky moc
| One time please!!!!!!! |

bejek
(
Sapphire13
(
oxyz
(
lopata
(
JackHarkness
(

diky moc spravil som všetko ale netestoval som ešte ale hodi sa to určite