Advertisement
congdantoancau

Sublime Text F5

Feb 3rd, 2018
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; https://stackoverflow.com/questions/32870613/check-all-tabs-in-browser-with-ahk
  2. #IfWinActive, Sublime
  3. F5::
  4. Send, ^s
  5. if (WinExist("Chrome"))
  6. {
  7.     IfWinActive, html
  8.     {
  9.         ClipSaved := Clipboard
  10.         Send, ^f ; Find
  11.         ; Focus the title
  12.         Send, <title>
  13.         Send, {Enter}
  14.         Send, {Esc}
  15.         Send, {Right}
  16.         Send, ^+{Right} ; Select the title
  17.         Send, ^c ; Copy the title
  18.        
  19.         WinActivate, Chrome
  20.        
  21.         SearchedTab := Clipboard
  22.        
  23.         Loop, 20
  24.         {
  25.             Sleep, 40
  26.             IfWinActive, %SearchedTab%
  27.                 break
  28.             else
  29.                 send {Control down}{Tab}{Control Up}
  30.         }
  31.         Clipboard := ClipSaved
  32.         return 
  33.     }
  34. }
  35. else
  36.     Send, {f5}
  37. return
  38. #If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement