Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Keyboard shortcut for "Use grayscale"

Hello,


I some use a Use grayscale. I cannot find a keybard shortcut for Use grayscale by Accessibility. Does someone know how can I add new item?


Thank you.

MacBook Pro (13-inch Mid 2012), OS X Mavericks (10.9)

Posted on Feb 21, 2014 2:16 AM

Reply
19 replies

Feb 21, 2014 6:27 AM in response to ekremkoc

OK, this is a pretty complex process and I admit I am struggling with it myself.


You need to run something called AppleScript Editor, which is in your Utilities folder. You paste balton's text into the upper part of the Applescript window and save it to the desktop, then run it. That SHOULD be it as balton describes. Unfortunately, in Mavericks, there is an issue with a message that comes up stating "ui element scripting is not enabled". The solution (apparently) is to type a line into Terminal - as described here:


http://hints.macworld.com/article.php?story=20131025064624795


This is all pretty complex stuff and, to be honest, I can't get it to work myself (probably would if I worked on it for a while but quite busy at the moment).


All the above is about creating a subroutine that will work as a shortcut to toggle greyscale. The short answer to your original question - asking if there is a keyboard shortcut is "no". It's as easy to do it through System Preferences > Accessibility > use Greyscale.


Sorry I can't be more help.

Apr 16, 2014 9:11 PM in response to ekremkoc

While this isn't a keyboard shortcut, it is an AppleScript program that will toggle between color and grayscale, on MacOSX 10.9 Mavericks.


I guess you could assign it to a hotkey, and you'd get your desired effect.


If you save it as an Application from the AppleScript editor, it will refuse to run the first time.


You'll have to enable it in System Preferences --> Security & Privacy --> Accessibility --> Privacy --> Allow the apps below to control your computer


... that is Apple's new security policy requirement.


===== script begins here ====


(*

ToggleGrayScaleMode for MacOSX 10.9 Mavericks

works as of 15 april 2014


This is an AppleScript UI script to toggle GrayScaleMode in System Preferences.


I am red-green colorblind and grayscale mode helps me a lot.


Just wish they had a Grayscale mode for the iPad.


Run this script in Applescript Editor and then save an an Application.

Works for me. Hope it can be usefull for you.


Mike

mlongval@gmail.com

*)



tell application "System Preferences"

activate

tell application "System Events"

tell application process "System Preferences"

set frontmost to true

delay 1


click menu item "Accessibility" of menu "View" of menu bar item "View" of menu bar 1 of application process "System Preferences" of application "System Events"


-- add delay if needed


--delay 1



-- The MAGIC word here is SELECT .... you are SELECTing a row NOT CLICKing a row !!!!!!!!!

select row 2 of table 1 of scroll area 1 of window "Accessibility" of application process "System Preferences" of application "System Events"



-- Now you can CLICK the checkbox

click checkbox "Use grayscale" of window "Accessibility" of application process "System Preferences" of application "System Events"


-- add delay if needed


--delay 1


click menu item "Quit System Preferences" of menu "System Preferences" of menu bar item "System Preferences" of menu bar 1 of application process "System Preferences" of application "System Events"


end tell

end tell

end tell

May 17, 2014 4:41 PM in response to ekremkoc

This AppleScript works in Mavericks:


tell application "System Preferences" activate reveal (pane id "com.apple.preference.universalaccess") end tell tell application "System Events" tell process "System Preferences" tell window "Accessibility" tell table 1 of scroll area 1 select (row 2) end tell click checkbox "Use grayscale" end tell end tell end tell tell application "System Preferences" to quit

May 29, 2014 8:52 PM in response to ekremkoc

I think the problem is that your language is set to Dutch, and the script I posted expects English. Try this instead:


tell application "System Preferences"

reveal (pane id "com.apple.preference.universalaccess")

activate

end tell


tell application "System Events"

tell process "System Preferences"

tell window "Toegankelijkheid"

clickcheckbox "Gebruik grijstinten"

end tell

end tell

end tell

tell application "System Preferences" to quit

Jun 9, 2014 12:58 AM in response to ekremkoc

You may want to read this article on creating a Service in automator. This Service will then launch your app Grijstinten (As long as it resides in the Applications (Programma's) folder) when you press the configured shortcut.


In short, the article asks you to do the following:

  1. launch Automator
  2. choose File (Archief) > New (Nieuw)
  3. You'll see a dialogue asking you to choose what you want to create. Choose Service (Voorziening)
  4. In the window that appears now, search for Launch Application (Start Programma) using the search field at the top. When found, drag this action to the right to include it.
  5. You can then select your App Grijstinten from the list.
  6. Next, make sure that 'Service Receives' ('Voorziening Ontvangt Geselecteerde') is set to 'No imput' ('Geen Invoer').
  7. You can now save your new service. Name it Grijstinten. It will appear in the Services (Voorzieningen) menu by the name you gave it.
  8. Next, head to System Preferences (Systeemvoorkeuren) and choose Keyboard (Toetsenbord)
  9. Now head to the Shortcuts tab (Sneltoetsen)
  10. You will see a list of categories. You'll want to choose Services (Voorzieningen). In the second list, select Grijstinten (your newly created service).
  11. Once you selected it, you will see a button labeled 'Add Shortcut' ('Sneltoets Toevoegen'). Click it and then press the desired shortcut. After having done this, you may want to place a tick before the line containing your service, so that the system actually responds when you press the shortcut.
  12. Close the System Preferences window. You will now be able to use a shortcut to launch your app.


This may all seem a bit cumersome, but unfortunately it's the only solution available without using third party applications.

Jun 9, 2014 3:25 AM in response to ekremkoc

You've used the wrong action to create your service. Look at my screenshot below:User uploaded file


The second screenshot was right (the one where you actually assigned the shortcut). But you had Automator do something completely different, so your application wasn't launched).


If you've recreated the Automator service using the screenshot above, and you wish to test your workflow, press the Run (Voer Uit) button in the upper right corner of Automator's main window. You should see your application being launched and perform its intended actions. If all goes well, you can then Save your service again. You may have to choose a different name, though, as the other name already exists. So, first try and save the service under the same name as before, but if you get an error when saving, use a different service name.

Keyboard shortcut for "Use grayscale"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.