AutoHotkey: Launch App

By Xah Lee. Date: . Last updated: .

Launch App

#Requires AutoHotkey v2.0
; launch app by name
Run "Notepad"
#Requires AutoHotkey v2.0
; launch app by path
Run "C:\Windows\explorer.exe"

Launch App with parameters

#Requires AutoHotkey v2.0

; launch app with a parameter
Run "c:/Users/xah/bin/emacs-30.1/bin/runemacs.exe -Q"

Open File or Folder

#Requires AutoHotkey v2.0
; open file
Run "c:/Users/xah/Documents/todo.txt"
#Requires AutoHotkey v2.0
; open folder
Run "c:/Users/xah/Downloads/"

Set Key to Launch App

#Requires AutoHotkey v2.0
; assign a hotkey to launch a app

; Win+n
#n::Run "Notepad"

; Alt+n
!n::
{
Run("c:/Users/xah/Documents/")
}

; Ctrl+n
^n::
{
Run("c:/Users/xah/Downloads/")
}

; Ctrl+Alt+n
^!n::
{
Run("c:/Users/xah/Desktop/")
}