Google Docs Text Color

Hello all. I use Google Docs a lot and I understand that programming macros inside the Google Docs interface is difficult because you're working within an overriding application, in my case, Safari. Has anybody figured out a way to assign a KM macro for setting text color in Google Docs (Sheets) from within Safari?

I've had some success controlling Google Sheets with KM by using a combination of image recognition (e.g. look for and click on this button) and keyboard shortcuts.

Just playing around with Google Docs, you could, for example, have a macro look for and click on the text color button, then maybe use arrow keys to move to the color you want. You'll probably want to start by adding generous pauses between steps (which also helps with troubleshooting), then speeding it up until you get to a good speed that works consistently and where you don't have to wait for it to finish.

Thank you for the suggestion. I had been thinking about something like that, but I'm afraid of chaos ensuing LOL. I will try it, though.

Yes, that's why I put in generous pauses when I'm building/testing the macro, so I can cancel the macro (via a hotkey) in case things go sideways (especially with keystrokes, 'cause sometimes KM moves faster than the web page can handle).

Tip: use a variable(s) for the pause(s), so you only have to change the pause time in one place.

e.g. I'll use "shortPause" and "longPause" depending on what the steps are doing.

Another way to add delays for troubleshooting is the new 'Set Between Actions Delay' action.
Place at the start of a macro and every action will be delayed.

2 Likes