lukefleed

Win + E shortcut per Files

Feb 8th, 2021
64
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
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×