-
-
Save dariusz-wozniak/963915650a827307d7f8eaba3fd46227 to your computer and use it in GitHub Desktop.
Run, %USERPROFILE%\AppData\Local\slack\Update.exe --processStart "slack.exe", , Normal | |
WinWait, ahk_exe slack.exe | |
Loop, 50 | |
{ | |
WinHide, ahk_exe slack.exe | |
Sleep, 200 | |
} |
This pointed me in the right direction for using the Windows 10 Slack App. I modified the script as follows:
Run, %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\slack.exe, , Hide
WinWait, ahk_exe slack.exe
Loop, 50
{
WinClose, ahk_exe slack.exe
Sleep, 200
}
Changing Normal on the first line to Hide stops the initial flicker with the loading. You still get a slight flicker when the app itself closes. I modified the WinHide to WinClose in the loop. If you use WinHide, CPU levels remain higher as if the application was displaying. When you close, slack still pushes to the tray, then free's up memory and reduces CPU to near 0. Note for the close to work, the preferences in slack under Advanced, Other Options require the "Leave app running in notification area when the window is closed" option checked off, which I believe it is by default.
For me, Slack was installed at "C:\Program Files (x86)\Slack\Slack.exe"
Hi, I tried
Run, %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\slack.exe, , Hide
But it does not work, despite %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\slack.exe
working via command line.
Any thoughts why this might be?
That was a lifesaver, thank you. Also used the script for the more annoying Skype to start minimized.
Suggestion: use this as the first line instead:
Run, %USERPROFILE%\AppData\Local\slack\Update.exe --processStart "slack.exe", , Normal
I also replaced WinHide with WinMinimize so that the icon is kept on the taskbar.
ALL: to autostart, read about "shell:startup" on W10.