|
;
; Script Function: Darkfall Launcher
; Author: jackabal
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
;CoordMode, Mouse, Screen
Process, Priority, , HIGH
SetMouseDelay, 0
;SetDefaultMouseSpeed, 0
SetWinDelay, 0
SetControlDelay, 0
;================================================
; Variables
; Adjust to your needs
;================================================
LobbyPath=C:\Program Files (x86)\Darkfall\Lobby.exe
spamclick=0
checkforredbar=1
;================================================
; Main
;================================================
Run, %LobbyPath%
Window_TXT = Darkfall End User License
Winwait , %Window_TXT%
WinActivate , %Window_TXT%
WinwaitActive , %Window_TXT%
ControlClick, Button1, %Window_TXT%
Window_TXT = Darkfall 1.0.
Winwait , %Window_TXT%
ControlClick, Static1, %Window_TXT%
Winwait , %Window_TXT%, Patching completed
ControlClick, Static5, %Window_TXT%
sleep 200
ControlClick, Static19, %Window_TXT%
SlotReady=0
While SlotReady=0
{
slottxt =You have a login slot, press play
Winwait , %Window_TXT%, %slottxt% ,2,
if ErrorLevel ; i.e. if window is not present
{
if spamclick=1
{
if checkforredbar=1
{
Winactivate , %Window_TXT%
Winwaitactive , %Window_TXT%
PixelGetColor, pixcolor, 301,165 ,RGB
if pixcolor != 0xFF1222
{
ControlClick, Static19, %Window_TXT%
sleep 100
ControlClick, Static19, %Window_TXT%
}
}
else
{
ControlClick, Static19, %Window_TXT%
sleep 100
ControlClick, Static19, %Window_TXT%
}
}
}
else
SlotReady =1
}
ControlClick, Static6, %Window_TXT% ;click on play !
|