This is Great!!!
TY
Anyway I know simply nothing about AHK but I easily modified it to work with Betsson, and it works great. And I think It can be a little simpler because usually you should copy all of the files from the originals and the mod directory.
Tomorrow I will make a package and upload it or if I have time tonight.
Anyway here are the modified script I made and you can correct me if I went wrong in some way.
; OngameMod Starter v0.50
; Autor: Chris
; contributions by Roland ('s Functions)
; Contact: Chris228 @ 2+2 forum
#NoEnv
#SingleInstance force
SendMode Input
;------------- Settings -----------------------------------------------------------------------------
; Set the path to your OngameClient.exe
path=C:\Program Files\Betsson Poker\StartBetssonPoker.exe
; If the table mod is copied you will get a message ( 1 = enabled, 0 = disabled )
CopyMsg=0
; Automatic closing of the Welcome/News window from the Ongame client ( 1 = enabled, 0 = disabled )
CloseWelcomeMsg=0
; Using the login window for detection if the client has started ( 1 = enabled, 0 = disabled )
UseLogin=0
;------------- Program ------------------------------------------------------------------------------
wdir:=""
StringGetPos, pos, path, \, r1
if (pos > 0)
StringLeft, wdir, path, pos+1
FileCopy, %wdir%\resources\graphics\originals\*.*, %wdir%\resources\graphics\, 1
sleep, 1000
Run, %path%, %wdir%
sleep, 3000
stopTimer := CreateStopTimer(60)
Loop {
sleep, 500
if ( UseLogin = 1)
id:=LoginIDPokerRoom()
else
id:=LobbyIDPokerRoom()
if ! ( id = "" ) {
FileCopy, %wdir%\resources\graphics\mod\*.*, %wdir%\resources\graphics\, 1
if ( CopyMsg = 1)
msgbox, 0, OngameMod Starter, Tablemod copied., 5
break
}
if (A_Now > stopTimer) {
msgbox, 4, Ongame Mod Starter, Tablemod not copied. Copy now?, 120
IfMsgBox Yes
{
FileCopy, %wdir%\resources\graphics\mod\*.*, %wdir%\resources\graphics\, 1
}
break
}
}
if ( CloseWelcomeMsg = 1) {
stopTimer := CreateStopTimer(60)
Loop {
msgid:=MsgIDPokerRoom()
if ! ( msgid = "" ) {
WinClose, ahk_id %msgid%
break
}
if (A_Now > stopTimer)
break
sleep, 100
}
}
;------------- Functions -------------------------------------------------------------------------
LobbyIDPokerRoom() {
SetTitleMatchMode 1
WinGet, id, id, PokerRoom.com - Welcome
If ! id
WinGet, id, id, HollywoodPoker.com - Welcome
If ! id
WinGet, id, id, EurobetPoker - Welcome
If ! id
WinGet, id, id, Betsson - Welcome
return id
}
LoginIDPokerRoom() {
SetTitleMatchMode 1
WinGet, id, id, PokerRoom.com Login
If ! id
WinGet, id, id, HollywoodPoker.com Login
If ! id
WinGet, id, id, EurobetPoker Login
If ! id
WinGet, id, id, Betsson Login
return id
}
MsgIDPokerRoom() {
SetTitleMatchMode 3
WinGet, id, id, News
return id
}
CreateStopTimer(seconds)
{
stopTime := A_Now
EnvAdd, stopTime, %seconds%, seconds
return (stopTime)
}