daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Aug 13th, 2017 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. #NoTrayIcon
  3. #SingleInstance force
  4. ; #Warn  ; Enable warnings to assist with detecting common errors.
  5. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  6. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  7.  
  8. ; Double Right-Control for Apps Key
  9. ~RCtrl::
  10.     if ( A_PriorHotKey <> "~RCtrl" OR A_TimeSincePriorHotkey > 300 ) {
  11.         KeyWait RCtrl
  12.         Return
  13.     }
  14.     Send, {AppsKey}
  15. Return
  16.  
  17.  
  18. ; Search highlighted text/last copied from anywhere
  19. #g::
  20.     Send, ^c
  21.     Sleep 50
  22.     Run, http://www.google.com/search?q=%clipboard%
  23. Return
  24.  
  25.  
  26. ;Replace Cortana with open in Edge
  27. #c::
  28.     Send, ^c
  29.     if ( WinActive("ahk_class ApplicationFrameWindow") = 0 ) {
  30.         Send, #+1
  31.         WinWait,Microsoft Edge
  32.         Sleep 1500
  33.     }
  34.     WinGetTitle, title, A
  35.     GetPos := RegExMatch(title,"^(Start|New tab)( and \d+ more pages?)?")
  36.     if ( GetPos <> 1 ) {
  37.         Send, ^t
  38.         WinWait,New tab
  39.     }
  40.     Send, ^l^v{Enter}
  41.     Send, %title%
  42. Return
  43.  
  44.  
  45. ; Used with Oopsie to reopen last set of tabs
  46. ~^+a::
  47.     WinWait,Google Chrome, ,0.5
  48.     WinGetTitle, title, A
  49.     if ( title = "New Tab - Google Chrome" ) {
  50.         ToClose := WinExist("A")
  51.         Send, ^+t
  52.         WinClose, ahk_id %ToClose%
  53.     }
  54. Return
  55.  
  56.  
  57. ; WinKey + f opens Search Everything
  58. #f::
  59.     Run, "C:\Program Files\Everything\Everything.exe"
  60. Return
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top