tedg Posted August 10, 2012 Share Posted August 10, 2012 What I want to do is manually select a word or two and hit a keyboard shortcut that turns the text color to red. I have (on my Mac) Keyboard Maestro, which can select a menu and/or do all sorts of UI tasks. But to change to red you have to select a swatch from a palette. I think the solution will be to make a script that does something similar to TextStyleAdd (red). Then I can just select that script from the script menu. But the script creation window seems to allow only a few commands, none of them related to text. Can I do this? Link to comment Share on other sites More sharing options...
comment Posted August 10, 2012 Share Posted August 10, 2012 the script creation window seems to allow only a few commands, none of them related to text. That is correct; you need to use a calculation in your script, for example: Insert Calculated Result [ TextColor ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionstart ) ; Get ( ActiveSelectionSize ) ) ; RGB ( 200 ; 0 ; 0 ) ) ] Link to comment Share on other sites More sharing options...
tedg Posted August 10, 2012 Author Share Posted August 10, 2012 Yes, the Insert Calculated Results command is what I was missing. Trying your example, it turns the entire field red! All I want to do is select a couple words and have the script turn those words red. Thanks. Link to comment Share on other sites More sharing options...
comment Posted August 10, 2012 Share Posted August 10, 2012 Trying your example, it turns the entire field red! I don't think so: ColorizeSelection.fp7.zip Link to comment Share on other sites More sharing options...
tedg Posted August 10, 2012 Author Share Posted August 10, 2012 Duh. I had the select all checkbox checked. Many, many thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 4271 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now