#Requires AutoHotkey v2.0 ; Lesson 3: app-specific hotkeys and window control #HotIf WinActive("ahk_exe EXCEL.EXE") F1::Send "{F2}" ; in Excel, F1 edits the cell instead of opening Help ^+v::Send "^!v" ; Ctrl+Shift+V opens Paste Special #HotIf ; Win+E: activate Excel if open, otherwise start it #e::{ if WinExist("ahk_exe EXCEL.EXE") WinActivate else Run "excel.exe" } ; Win+Up: centre the active window at 1200x800 #Up::{ WinMove (A_ScreenWidth-1200)//2, (A_ScreenHeight-800)//2, 1200, 800, "A" }