You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Is there a way to simulate a mouse click anywhere on a screen in Dictate ?

I'm using Dictate because of hand problems. Unfortunately, it does not seem to have the ability as supplied to simulate mouse clicks anywhere on the screen as Dragon Naturally Speaking does on the Windows side.( I do not mean by this the ability to select an item in the menu, which It does have the built in ability to do.) It can, however, so I read, be scripted to do a lot of things. Is there an Applescript out there that would allow for the simulation of mouse clicks anywhere on the screen (as opposed to just on a UI item)?

2 gHz Core Duo iMac w 2 gigs RAM, Mac OS X (10.5.5)

Posted on Nov 10, 2008 6:37 AM

Reply
22 replies

Nov 28, 2008 8:09 AM in response to Everardo Verguizas

Hiroto,

Sometimes the simplest way is OK. I tried the syntax you suggested:
click mouse times 2 delay 200

This seemed to compile with no problem. However, though I tried delays from 100 to 500, I couldn't get double-click to work (launch an app from a Finder window).

So, I thought, why not just use this:

click mouse
click mouse

..and see what happens?

Well, it worked every time.

Maybe I never hit the right length of delay times before. (But I will say that the mouse double-click seemed to take a long time to exit when executed, even though it did NOT effect the double-click.)

Another consideration in the timing is that different users can set the responsiveness of the mouse to different speeds, so that what is a good delay for me might not work for someone else. I wonder if the "click mouse" code reads the individual mouse double-click speed setting somehow? If so, it might be better to use the two click mouse commands rather than hard-code the interval anyway.

As always, Mac users are ready to give (Sixties cultural reference). 🙂

Thanks.

Everardo

Nov 28, 2008 10:35 AM in response to Everardo Verguizas

Hello Everardo,

Possibly delay unit is 1/100 sec or 1/10 sec or... even 1 sec.

I'd try -
click mouse times 2 delay 2
click mouse times 2 delay 20

Or even -
click mouse times 2 delay 0.2

According to the dicitionary, the last one should fail or be executed as 'delay 0' (because 0.2 as integer is 0). BUT dictionary may be wrong!

Also I'd try -
click mouse times 2

This might work as double-click (with default delay value which I don't know).

---
After all, if delay unit is 1 sec and delay parameter only accepts integer value — such design makes no sense to me, though —, we'd not be able to use 'click mouse times 2 delay x' statement for double-click.
Even if that is the case, we may use combination of tried commands in sequence to simulate double-click as you suggested. Perhaps inserting small delay between two 'click mouse' commands would be better. (This 'delay' is a command given in standard additions.)
E.g.

click mouse
delay 0.2
click mouse

Cheers,
H

Nov 28, 2008 11:31 AM in response to Everardo Verguizas

Hiroto,

Again, keeping to the simplest alternative you mention, I've tried

click mouse times 2

and it works about the same as

click mouse
click mouse

In other words, both methods appear to do the job. As time permits, I'll fiddle with the other possibilities you mention but, right now, either of the two options above appears to give the desired result.

Of course, I'll have to continue testing how well this works and it's possible there may be circumstances in which these methods don't work. So far so good, however.

Thanks again.

Everardo

Nov 29, 2008 8:30 PM in response to Everardo Verguizas

One last thing. Ricky Buchanan, over at the Dictate discussion forums, has also tried out the secondary and middle-click parameters on click mouse and has gotten them to work. I have compiled both of these successfully and tested the secondary click successfully (it displays the drop-down when executed). I don't have the ability to test the middle-click but so far everything else seems to work OK.

Ricky may be doing a piece for ATMac to explain how to do all this and possibly provide an importable set of commands based on xTools Scripting Addition. At any rate, at his suggestion I have created an importable set of commands to click, double-click, secondary-click, and middle-click which we will test out.

Hopefully the word will get out to others needing this ability.

Everardo

Dec 5, 2008 5:11 PM in response to Everardo Verguizas

Ricky Buchanan has posted a very well-done blog post on the Applescripts to simulate single- and double-clicks as well as secondary- and middle-clicks at her website, atmac.org. The exact URL is http://atmac.org/2008/12/01/voice-activated-mouse-clicks-with-macspeech-dictate/. There are instructions and screen shots that make the process understandable and fairly simple.

She has also thoughtfully provided a downloadable file you can import into Dictate using Dictate's command import service (at file/command import..). This means that you don't have to do any programming, just follow the instructions.

Dec 6, 2008 6:51 PM in response to Hiroto

Hiroto,

Thank you for your kind assistance. Without you I would not have gotten on the right track in the first place and without your further advice my original code was in error. I asked Ms. Buchanan to credit you by name in the article, which she of course did.

I think this resulted in doing some good for some people. And you were a very necessary part of it.

Everardo

Is there a way to simulate a mouse click anywhere on a screen in Dictate ?

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