google doc: change (and rotate) color using a shortcut

Post your working scripts, libraries and tools
partof
Posts: 63
Joined: 16 Jan 2016, 08:38

google doc: change (and rotate) color using a shortcut

13 Dec 2017, 06:12

If the color is black change it to blue, if it's blue change it to red, etc. else change it to black.

Code: Select all

; ************** check if windows full screen
#IfWinActive ahk_exe chrome.exe ; the shortcut will only work on chrome 

!^+p:: 
;PART 1: check if the docs is in full-screen (the script work with the mouse position)
; put the mouse on the right top corner of the screen, freeze the spy tool, copy past the relative position (1357, 6 ).
PixelGetColor ColorWin, 1357, 6 RGB  ; get the color of this area
; In my case this part should be white in full screen
if (ColorWin!="0xFFFFFF")   ; if it's white (= fullscreen is OFF)
	send {f11};  then press f11 to activate fullscreen

#
PixelGetColor ColorText, 647, 86 RGB  
;msgbox, 64, (%ColorText%)   ; uncomment if needed for debug to get color to

; get the mouse position and the color of each one you want

if (ColorText="0x000000") {   ;  black
	click,647, 86
	click,712, 120
	click, 786, 177 ; blue
} 
else If (ColorText="0xFF0000") {  ;  blue
	click,647, 86
	click,712, 120
	click, 767, 179 ; blue light
}

 else IF (ColorText="0xE8864A") {  ;  blue light
	click,647, 86
	click,712, 120
	click, 679, 176 ; red
}
else ; 
{
	click,647, 86
	click,712, 120
	click, 657, 151 ; black
}

return


to change the text into a single color: https://autohotkey.com/boards/viewtopic ... 03#p188303

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 34 guests