Skip to content

Instantly share code, notes, and snippets.

@WiliTest
Last active October 27, 2018 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WiliTest/32d9d96cf6f62caa0e8f9c78b290c172 to your computer and use it in GitHub Desktop.
Save WiliTest/32d9d96cf6f62caa0e8f9c78b290c172 to your computer and use it in GitHub Desktop.
; *********************** chrome FONT SIZE = 6 (gdoc)
; shortcut you can use: Alt=! CTRL=^ shift=+ windowskey=#
; you can debug it by inserting mesage box in the code: msgbox it's not full screen
; dont put comment inside a function: it will bug.
!q:: ; (alt+Q)
; first, maximized the screen
send #{Up}
; then get the color of the win corner (to know if the brownser is set ine full screen or not)
PixelGetColor ColorOfWinCorner, 1357, 6 RGB
; if it's not white (0xFFFFFF)= it's not full screen. So set where it should click (the text size field)
; to find it, you need to use the "relative" position of "window spy" tool (which goes with ahk)
if (ColorOfWinCorner!="0xFFFFFF") {
MouseGetPos, xpos, ypos ; get current mouse position
click, 466, 182
send {Backspace}{Backspace}
Send, 6
sleep 100
send {ENTER}
MouseMove, xpos, ypos
sleep 200
MouseClick, left
}
; else it should be full screen (set where it should click (the text size field isn't the same spot on your screen)
else {
MouseGetPos, xpos, ypos
click, 456, 88
send {Backspace}{Backspace}
Send, 6
sleep 100
send {ENTER}
MouseMove, xpos, ypos
sleep 200
MouseClick, left
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment