Advertisement
lukefleed

Win + E shortcut per Files

Feb 8th, 2021
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FilesTitle := "Files ahk_class ApplicationFrameWindow ahk_exe ApplicationFrameHost.exe"
  2. FilesLocation := USERPROFILE . "\AppData\Local\Microsoft\WindowsApps\files.exe"
  3.  
  4. ; Win + E
  5. #e::
  6.     if WinExist(FilesTitle) {
  7.         WinActivate % FilesTitle     ; Set focus
  8.         SendInput ^t                    ; Send CTRL + t shortcut to open a new tab
  9.     } else {
  10.         Run % FilesLocation          ; Start Files
  11.         WinWait % FilesTitle         ; Wait for it ...
  12.         WinActivate % FilesTitle     ; Set focus
  13.     }
  14. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement