The complete source code is this one
I've added the OnMessage after the
Code:
WinWaitActive, %SkinName% - %Langue%,
But the app I launch is a flash soft, and it looks like my script wil never receive messages from this app
Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
; Lecture du fichier .ini
IniRead, Langue, WamSkins.ini, Config, ILangue
IniRead, SkinName, WamSkins.ini, Config, ISkinName
IniRead, ProgramPath, WamSkins.ini, Config, IProgramPath
IniRead, DirSource, WamSkins.ini, Config, IDirSource
IniRead, Programme, WamSkins.ini, Config, IProgramme
IniRead, PlaceMintPath, WamSkins.ini, Config, IPlaceMintPath
IniRead, DSkin, WamSkins.ini, Options, PSkin
IniRead, DPlaceMint, WamSkins.ini, Options, PPlaceMint
IniRead, DLimites, WamSkins.ini, Options, PLimites
IniRead, DStakes, WamSkins.ini, Options, PStakes
IniRead, DTables, WamSkins.ini, Options, PTables
if DPlaceMint=1
CPM=+Checked
If DLimites = NL
CNL=+Checked
If DLimites = PL
CPL=+Checked
If DLimites = FL
CFL=+Checked
if DStakes = Mic
CMic=+Checked
if DStakes = Low
CLow=+Checked
if DStakes = Med
CMed=+Checked
if DStakes = High
CHig=+Checked
if DTables = SH
CSH=+Checked
if DTables = FH
CFH=+Checked
if DTables = HU
CHU=+Checked
if DTables = All
CAll=+Checked
Gui, Add, Text, x12 y12 w100 h20 , Nom du Skin:
Gui, Add, Edit, x92 y12 w170 h20 vSkin, %DSkin%
Gui, Add, Button, x62 y262 w70 h20 , OK
Gui, Add, Button, x262 y262 w70 h20 , Cancel
Gui, Add, Text, x12 y52 w100 h20 , Lancer PlaceMint :
Gui, Add, CheckBox, x112 y42 w60 h30 vPlaceMint %CPM%,
Gui, Add, GroupBox, x12 y92 w110 h150 , LIMITES
Gui, Add, Radio, x22 y112 w100 h30 vNL %CNL%, No-Limit
Gui, Add, Radio, x22 y142 w100 h30 vPL %CPL%, Pot-Limit
Gui, Add, Radio, x22 y172 w100 h30 vFL %CFL%, Fix Limit
Gui, Add, GroupBox, x132 y92 w120 h150 , MISES
Gui, Add, Radio, x142 y112 w100 h30 vMic %CMic%, Micro
Gui, Add, Radio, x142 y142 w100 h30 vMin %CLow%, Minimales
Gui, Add, Radio, x142 y172 w100 h30 vMoy %CMed%, Moyennes
Gui, Add, Radio, x142 y202 w100 h30 vMax %CHig%, Maximales
Gui, Add, GroupBox, x262 y92 w120 h150 , TABLES
Gui, Add, Radio, x272 y112 w100 h30 vSH %CSH%, Short handed
Gui, Add, Radio, x272 y142 w100 h30 vFR %CFH%, Complète
Gui, Add, Radio, x272 y172 w100 h30 vHU %CHU%, Heads Up
Gui, Add, Radio, x272 y202 w100 h30 vAll %CAll%, Toutes
; Generated using SmartGUI Creator 4.0
Gui, Show, x279 y217 h311 w403, Chargeur de Skins Ongame V2.1
Return
GuiClose:
ExitApp
ButtonCancel:
ExitApp
ButtonOK:
Gui, submit
IniWrite, %PlaceMint%, wamskins.ini, Options, PPlaceMint
IniWrite, %Skin%, wamskins.ini, Options, PSkin
if NL=1
IniWrite, NL, wamskins.ini, Options, PLimites
if PL=1
IniWrite, PL, wamskins.ini, Options, PLimites
if FL=1
IniWrite, FL, wamskins.ini, Options, PLimites
if Mic=1
IniWrite, Mic, wamskins.ini, Options, PStakes
if Min=1
IniWrite, Low, wamskins.ini, Options, PStakes
if Moy=1
IniWrite, Med, wamskins.ini, Options, PStakes
if Max=1
IniWrite, High, wamskins.ini, Options, PStakes
if SH=1
IniWrite, SH, wamskins.ini, Options, PTables
if FR=1
IniWrite, FH, wamskins.ini, Options, PTables
if HU=1
IniWrite, HU, wamskins.ini, Options, PTables
if All=1
IniWrite, All, wamskins.ini, Options, PTables
DestinationFileName=TableImages.swf
DestinationConfig=P5-data.xml
TableImageSourceFile=%DirSource%\%Skin%\TableImages.swf
ConfigSourceFile=%DirSource%\%Skin%\P5-data.xml
; Si Placemint est sur ON alors on le lance
if (PlaceMint = 1)
{
Process, Exist, PlaceMint.exe
if not ErrorLevel ; No PID for PlaceMint was found.
{
Run, PlaceMint.exe, %PlaceMintPath%
WinWait, PlaceMint
WinMinimize
}
else
Msgbox, PlaceMint est déjà actif sur votre system. Il ne sera pas relancé
}
Process, Exist, WinamaxPoker.exe
if ErrorLevel ; PID existe deja
{
Msgbox, Votre client de poker est déjà actif sur votre system. Vous devez le fermer avant de relancer. Arret de OSL
exitapp
}
; EXECUTION de Winamax et LOGIN AUTO
Run, %Programme%, %ProgramPath%
WinWait, %SkinName% ahk_class FlashHostClass
Sleep, 1000
IfWinNotActive, %SkinName%, , WinActivate, Winamax,
WinWaitActive, %SkinName%,
Send, {ENTER}
WinWait, %SkinName% - %Langue%
IfWinNotActive, %SkinName% - %Langue%, , WinActivate, %SkinName% - %Langue%,
WinWaitActive, %SkinName% - %Langue%,
; MODIF SKIN TABLE
FileDelete, %ProgramPath%\%DestinationFileName%
FileCopy, %TableImageSourceFile%, %ProgramPath%\%DestinationFileName%
FileDelete, %ProgramPath%\%DestinationConfig%
FileCopy, %ConfigSourceFile%, %ProgramPath%\%DestinationConfig%
; On ferme le chat et on click sur Cash Game
Click, 762, 309
Sleep, 100
Click, 141, 50
Sleep, 100
; Gestion Choix LIMITE
Click, 77, 115
Sleep, 100
if NL = 1
{
Click, 100, 145
Sleep, 100
}
else if PL = 1
{
Click, 100, 162
Sleep, 100
}
else if FL = 1
{
Click, 100, 179
Sleep, 100
}
else
{
Click, 100, 145
Sleep, 100
}
; Gestion choix Stake
Click, 237, 115
Sleep, 100
if Mic = 1
{
Click, 230, 145
Sleep, 100
}
else if Min = 1
{
Click, 230, 162
Sleep, 100
}
else if Moy = 1
{
Click, 230, 179
Sleep, 100
}
else if Max = 1
{
Click, 230, 196
Sleep, 100
}
else
{
Click, 230, 145
Sleep, 100
}
;Gestion choix table
Click, 396, 115
Sleep, 100
if SH = 1
{
Click, 410, 145
Sleep, 100
}
else if FR = 1
{
Click, 410, 162
Sleep, 100
}
else if HU = 1
{
Click, 410, 179
Sleep, 100
}
else if All = 1
{
Click, 410, 196
Sleep, 100
}
else
{
Click, 410, 145
Sleep, 100
}
Sleep, 100
MouseClick, left, 419, 153
Sleep, 100
MouseClick, left, 419, 153
Sleep, 100
MouseClick, left, 496, 298
Sleep, 2000
MouseClick, left, 393, 170
Sleep, 100
ExitApp