RageQuit

Post gaming related scripts
DeleteThisUser

RageQuit

14 Jan 2018, 08:49

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

RageQuitActiveGame() {
; For the games that just take too long to exit ..
; Hash key is window witle, value: executable
RageQuit := Object("World of Warships","worldofwarships.exe", "Rust","RustClient.exe")
WinGetActiveTitle, active_title
if ( active_title <> "" ) {
; Active window has a title. We might be in a game.
For key, value in RageQuit {
; key -> Window title of the game we're looking for
; value -> executable of the game we're looking for
if ( active_title == key ) {
Process,Close,%value%
MsgBox "RageQuit - Killed %active_title% : %value%"
return
}
}
}
}

^q::RageQuitActiveGame()

return

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 25 guests