Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- SendMode Input
- SetWorkingDir %A_ScriptDir%
- if not A_IsAdmin
- {
- Run *RunAs "%A_ScriptFullPath%"
- ExitApp
- }
- #SingleInstance, Force
- SetBatchLines, -1
- DetectHiddenWindows, On
- SetTitleMatchMode, 2
- GroupAdd HOOKHS, ahk_class ThunderRT6FormDC
- GroupAdd HOOKHS, HyperSpin ; any application with 'HyperSpin' in the title
- GroupAdd HOOKHS, HyperSpin.exe
- GroupAdd HOOKRL, ahk_class CoverFE
- GroupAdd HOOKRL, RocketLauncher ; any application with 'RocketLauncher' in the title
- GroupAdd HOOKRL, RocketLauncher.exe
- ifWinExist, VLC media player
- {
- Process, Close, vlc.exe ; prevent double-run of VLC causing conflicts
- }
- ; This is the main item we are running, only runs if no other instance
- ; and also waits until HyperSpin (ThunderRT6FormDC) is running already
- IfWinExist, ahk_class ThunderRT6FormDC
- {
- run, "VLCPortable.exe" --qt-start-minimized --loop ANArcade81.mp3
- }
- ; Now we look for RocketLauncher group, when that is active, we Want
- ; everything to shut down automatically.
- IfWinExist, ahk_group HOOKRL
- {
- SplashTextOn, 250, 75, Utility Wheel, Now unloaded!
- TrayTip, Utility Wheel Exiting, Closing Ambient Noise for Game Start, 1, 33
- Sleep 2000
- Process, Close, VLC.exe
- Process, Close, VLCPortable.exe
- SplashTextOff
- ExitApp
- }
- ; Alternatively, we look for HyperSpin group to be minimized/Hidden
- ; and then also shut down everything automatically
- IfWinNotActive, ahk_group HOOKHS
- {
- SplashTextOn, 250, 75, Utility Wheel, Now unloaded!
- TrayTip, Utility Wheel Exiting, Closing Ambient Noise for Game Start, 1, 33
- Sleep 2000
- Process, Close, VLC.exe
- Process, Close, VLCPortable.exe
- SplashTextOff
- ExitApp
- }
- ; But also, at any time, end user can shut down whole process with Tab Key
- ; or they can escape the whole program with Escape key too
- Tab::
- DetectHiddenWindows, On
- SplashTextOn, 250, 75, Utility Wheel, Ambient Noise Shutting Down.`nOne Moment...
- Sleep 1000
- Process, Close, VLC.exe
- Process, Close, VLCPortable.exe
- SplashTextOff
- ExitApp
- Return
- ; Always have a kill switch
- Escape::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement