There are two utility functions for this purpose:
a) Useful for regular Window Apps
Code: Select all
OpenOrShowAppBasedOnExeName(AppAddress)
Code: Select all
OpenOrShowAppBasedOnWindowTitle(WindowTitleWord, AppAddress)
Code: Select all
F7:: OpenOrShowAppBasedOnExeName("C:\Windows\System32\SnippingTool.exe")
Code: Select all
F8:: OpenOrShowAppBasedOnWindowTitle("Gmail", "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --app=https mail.google.com /mail/")
Note: The Source Code with the last actualization can be found here https://github.com/JuanmaMenendez/AutoHotkey-script-Open-Show-Apps
Thanks