Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. grey := 0xBFC2C6
  2. blue := 0x0F78E1
  3. F1::
  4. Send, {Ctrl down}{Shift down}i{Shift up}{Ctrl up}
  5. FormatTime, CurrentDateTime,, yyMMddHHmmss
  6. prefix_ := ":screenshot --fullpage --filename screenshots\firefox-screenshot-"
  7. suffix_ := ".png"
  8. command_ := %prefix_%%CurrentDateTime%%suffix_% ; file will be saved as C:\Users\myuser\Downloads\firefox-screenshot-datetime.png
  9. PixelGetColor, color_, 21, 1026, RGB ; I think these coordinates are based on the desktop resolution. They only work on a 1920x1080 monitor with FF maximized
  10. if (color_ = grey)
  11. {
  12.   ; grey means it's not in focus, so click the command line
  13.   Click 40, 1026
  14.   ; type some stuff into the console
  15.   SendInput, %command_%
  16.   Send, {Enter}
  17. }
  18. else if (color_ = blue)
  19. {
  20.   ; blue means it's in focus
  21.   ; type some stuff into the console
  22.   SendInput, %command_%
  23.   Send, {Enter}
  24. }
  25. else
  26. {
  27.   ; hit Esc to open the command line
  28.   Send, {ESC}
  29.   ; type some stuff into the console
  30.   SendInput, %command_%
  31.   Send, {Enter}
  32. }
  33. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement