Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Created January 14, 2024 21:10
Show Gist options
  • Save JoeGlines/c7b6ce5aae09678047f6c591ad52c5ea to your computer and use it in GitHub Desktop.
Save JoeGlines/c7b6ce5aae09678047f6c591ad52c5ea to your computer and use it in GitHub Desktop.
How to launch Windows apps with AHK v2
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey courses.
;They"re structured in a way to make learning AHK EASY: https://the-Automator.com/Discover
;*******************************************************
#SingleInstance
#Requires Autohotkey v2.0+
runApp('Spotify') ;this will launch Spotify
runApp(appName) { ; https://www.autohotkey.com/boards/viewtopic.php?p=438517#p438517
For app in ComObject('Shell.Application').NameSpace('shell:AppsFolder').Items
(app.Name = appName) && RunWait('explorer shell:appsFolder\' app.Path)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment