Create command "Space" as follows:
- Open Automator
- Click New Document
- Choose Workflow
- Search for AppleScript
- Drag Run AppleScript to the right hand window
- Replace "(* your script goes here *)"
- with the following code:
set _currentAppName to short name of (info for (path to frontmost application as alias)) try tell application "System Events" tell process _currentAppName key code 49 -- space end tell end tell end try
- Click on the hammer icon to compile it. If you get no compile errors proceed to save it to wherever you keep your workflows. I put mine under Documents/Voice Control/Workflows.
- Now create a Voice Control command of type Workflow and choose the file you saved earlier.