Controlling QuickTime Player with your Voice
Following on from my first post explaining how to create custom commands in DragonDictate for Mac. In this post: everything you need to play and pause QuickTime Player on macOS using one simple voice command:
From the Tools menu and DragonDictate choose the Commands option. To create a new command from this window, you can either choose the New Command option from the File menu or use the keyboard shortcut Shift Command N.
As you can see you have a number of new options on the right-hand pane of the command window, this is where you can control the context, type and action to each of your commands will take.
In this case we are going to be using an Applescript command, so you need to change the following options to reflect that:
- Command Name = Xylophone QuickTime Toggle
- Command Description = This command will play QuickTime if it is paused, and pause it if it is playing.
- Context = Global (this means it will run when any application is foremost and not just one particular application is open)
- Type = AppleScript
- The last option is a large window where we put the AppleScript we wish to be run when our command is issued. In this case the AppleScript is:
tell application "QuickTime Player" if document 1 is playing then pause document 1 else play document 1 end if end tell
With all of that filled in correctly, click on the Compile button to make sure there are no errors in your AppleScript (it will tell you if there are) and finally click Save. You can then close the command window and start and stop QuickTime Player will using just your voice.
So in summary my verbal command is “Xylophone QuickTime Toggle”
And the AppleScript you will need is here: