One feature missing from the still-new [msd] program is the ability to control the mouse. This addition won't let you control the movement of the mouse, but we can teach you how to use your voice for mouse clicks. For those who have the ability to move the mouse, this could make the difference between a usable computer system and an unusable computer system.
To insert the commands to generate mouse clicks into MacSpeech Dictate you'll first need to download two files. Download the files by right clicking (or command clicking if you have a one-button mouse) on the files and selecting "Download Linked File" if you're using Safari, or selecting "Save Link As..." if you're using Firefox. Just leave them in your Downloads folder for now:
[Edit: I have put a zipped version of the Mouse Click commands here so we don't have so many problems with Safari changing the file name.]
First, double-click on the xtool-20.dmg file to open it up. Now you need to put the XTool.osax file in the directory /Library/ScriptingAdditions. Here's step by step instructions for those who need them - if you don't need the detailed instructions, just scroll down to the next section.
Open the Finder and select "Computer" from the "Go" menu, like this:
Reminder: You can click on any of the pictures here to see a larger image.
Your Finder window will switch to displaying all the disks on your computer. Unless you've renamed it, the main disk will be called Macintosh HD. Double-click on that disk to open it:
Now open the Library folder on the hard drive you just opened, again by double clicking it:
Now you need to create a new folder. Press shift-command-N or select "New Folder" from the Finder menu, and name the new folder ScriptingAdditions:
Double-click on your new folder to open it.
Now go back to the window you opened first - the XTool 2.0 that you downloaded. Drag the file XTool.osax from that window to your new ScriptingAdditions directory. When you're done, your new directory should look like this:
That part makes the mouse-clicking commands available to AppleScript.
Now we have to put the AppleScript commands into MacSpeech Dictate. If your mouse-clicks.commandstext file is still zipped - it will have a zipper on the icon and the word "ZIP" - then double-click it to extract the regular file which will have a plain icon which looks like a sheet of paper. This part's much easier - just open up MacSpeech Dictate and select "Command Import" from the "File" menu:
In the dialog box, go to the Downloads folder (or wherever you downloaded the file to) and select the file mouse-clicks.commandstext that you downloaded. MacSpeech Dictate will process for a moment, then you should see this dialog box:
Congraatulations - you now have four new commands within MacSpeech Dictate. They can be used while you're in dictation mode or in command mode. These are the commands:
- Mouse click
- Mouse double click
- Mouse right click
- Mouse middle click
The names should be self explanatory, the first two commands use the left mouse button, the third command the right button (opens context menus) and the fourth command the middle button (not often used).
These commands won't move the mouse for you, the mouse clicks happen at wherever the current mouse location is. But if you want to take some strain off that mousing hand, not having to press the buttons is a good start.
We're working on commands to move the mouse, and undoubtedly the MacSpeech Dictate team are doing the same and these commands will feature in Dictate itself very soon. In the mean time, I think this is a useful stop-gap measure.
Special thanks for the information in this article goes to Everardo Verguizas who put most of this information together for me on the MacSpeech Dictate forums, Hiroto from the AppleScript Forum on Apple.com who found XTool which does the actual mouse clicking, and of course Jean-Baptiste Le Stang who wrote XTool in the first place and made it freely available. The only part I did was streamline the process and write this article. The original download site for XTool is http://lestang.org/osax/XTool/XTool-2.0.dmg.tgz, I have redistributed it here because I suspect many readers won't have Stuffit available to uncompress .tgz files and I wanted the process to be as simple as possible.
Please let us know how this works (or doesn't work) for you - leave a comment or three at the end of this post.
- Ricky Buchanan and Everardo Verguizas