Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grey := 0xBFC2C6
- blue := 0x0F78E1
- F1::
- Send, {Ctrl down}{Shift down}i{Shift up}{Ctrl up}
- FormatTime, CurrentDateTime,, yyMMddHHmmss
- prefix_ := ":screenshot --fullpage --filename screenshots\firefox-screenshot-"
- suffix_ := ".png"
- command_ := %prefix_%%CurrentDateTime%%suffix_% ; file will be saved as C:\Users\myuser\Downloads\firefox-screenshot-datetime.png
- 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
- if (color_ = grey)
- {
- ; grey means it's not in focus, so click the command line
- Click 40, 1026
- ; type some stuff into the console
- SendInput, %command_%
- Send, {Enter}
- }
- else if (color_ = blue)
- {
- ; blue means it's in focus
- ; type some stuff into the console
- SendInput, %command_%
- Send, {Enter}
- }
- else
- {
- ; hit Esc to open the command line
- Send, {ESC}
- ; type some stuff into the console
- SendInput, %command_%
- Send, {Enter}
- }
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement