Skip to content

Instantly share code, notes, and snippets.

@karolzlot
Last active March 13, 2022 03:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karolzlot/bc613769f579bd201cf4d438c6d8ced4 to your computer and use it in GitHub Desktop.
Save karolzlot/bc613769f579bd201cf4d438c6d8ced4 to your computer and use it in GitHub Desktop.
This script is written in AHK v2
#SingleInstance Force
#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.
; This script hides Discord to tray.
if (not ProcessExist("Discord.exe"))
{
Run "C:\Users\user\AppData\Local\Discord\Update.exe --processStart Discord.exe --process-start-args --start-minimized"
}
; Below is not needed anymore
; WinWait "Discord"
; discord_window_title := WinGetTitle("Discord")
; if (discord_window_title == "Discord Updater")
; {
; WinMinimize "Discord Updater"
; WinWaitClose "Discord Updater"
; WinWait "Discord"
; }
; WinClose "Discord"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment