forked from nadir/adobe-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRPC.ahk
27 lines (20 loc) · 1.5 KB
/
RPC.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
;----------------------------------------------------------------------------------------------------------------------------
;----------------------------------------------------------------------------------------------------------------------------
#NoTrayIcon ;Used for removing icon in the Taskbar System tray.
#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.
;----------------------MAIN CODE STARTS HERE--------------------------------
DetectHiddenWindows, On ;For detecting hidden windows
Run, C:\Discord-Rich Presence\RP-Adobe\rpc.exe, ,Hide ;Run .exe file in hidden mode.
Loop ;Loops till the file itself is not externally terminated.
{
WinWait, ahk_exe rpc.exe ;Waits for the .exe file to exist.
WinWaitClose, ahk_exe rpc.exe ;Waits for the .exe file to close.
Sleep, 2500 ;Sleep for 2.5 seconds.
Run, C:\Discord-Rich Presence\RP-Adobe\rpc.exe, ,Hide ;Runs the .exe file again in hidden mode.
}
;----------------------------------------------------------------------------------------------------------------------------
;----------------------------------------------------------------------------------------------------------------------------
;THE CODE WONT WORK WITHOUT INSTALLING AUTOHOTKEY (AHK)