Hi,
So here is my goal, to create a more useable shortcut combo for VOCR. For those who don't know, VOCR is an OCR script for VoiceOver that is awesome! The trouble with it is, the shortcuts are a bit digit gymnastic for my liking. Command, control, shift W to scan a window, which is just a bit messy. My desire is to create a VoiceOver keyboard commander, using the right option key with / to scan. The issue is, I'm not sure how to create this key combination as an actionable shortcut, hence turning to you lot...
Any ideas?
Comments
Try this...
1. Open Script editor.
2. Paste the following:
tell application "System Events"
keystroke "w" using {command down, shift down, control down}
end tell
3. Make sure the dropdown is set to AppleScript and not Java.
4. Press Command + R to run the script.
5. Pray to the Gods that it works. 😅
If all goes well, it will do its thing.
Note -- you may have to have VOCR running in the background.
Additionally, the first time it runs you might get a security alert directing you to Privacy and Security settings, where you will likely need to allow Script Editor to 'control this computer'.
So, the script works like a…
So, the script works like a charm. I did have to allow script editor to access the keyboard input through the rather confusingly named accessibility, as you advised. Trouble is now, though the script works, adding it to a VO commander doesn't. I've tried a few different combinations, V, / and full stop, none of which invoke the script. I thought there might be the same issue with script editor and added VoiceOver to the accessibility section in privacy, but no go. I'm wondering if, as VOCR is already an apple script, trying to run both with VoiceOver is causing some issue.
I had a peak inside the VOCR package and there are a couple of scripts in there, but they don't do much either.
Allow VO to...
Have you checked the lil box on the general category that reads 'Allow VO to be controlled with AppleScript'?
Thanks for posting this
I have exactly the same problem with VOCR. Not helped because I only use it occasionally. I can never remember what combination of buttons I need to start it. I inevitably press Cmd+W at some point and shut down whatever window I'm wanting to scan. I posted an issue on their GitHub to add a context menu item to start the scan as that would be all I need. Not sure if the project is being actively developed?
Anyway might give this a go when feeling brave. Thanks for sharing!
I wonder if there's a way to do something similar with shortcuts. Then ask the S lady if she can do the work for me. I find the shortcuts app terrifying though.
Regarding shortcuts
I am sure it is possible. "Shortcuts" is just an expansion/culmination of Workflow + Apple Script.
~Me. 😃