Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I use Voice Over and Dragon Dictate. I have figured out how to make Dragon Dictate press Control-Option-A, which makes Voice Over read a page of text, and now I would like to figure out how to tell Voice Over to stop reading through Dragon Dictate. The trouble is that the Voice Over keystroke is just Control. I have never been able to find any AppleScript key code for this.

On the same note, whenever I read about keystrokes in AppleScript, I get the impression that I'm always expected to press some other key along with the control, the command or the option modifier key. But what if I just want to press one modifier key through a program like Dragon Dictate?

share|improve this question
add comment

4 Answers 4

If you need to do something and hold it down, try something like this:

                tell application "System Events"
                    tell process "Photoshop"
                        option key down
                    end tell
                end tell
                DO OTHER STUFF HERE
                tell application "System Events"
                    tell process "Photoshop"
                        option key up
                    end tell
                end tell
share|improve this answer
add comment

There is a little app called Key Codes, which states that the key code for the control key is 65535 or 0xffff.

share|improve this answer
add comment

This might work for you:

tell application "System Events"
    keystroke control
end tell
share|improve this answer
add comment

keystroke control didn't work for me, but the key code of the left control is usually 59.

delay 1
tell application "System Events"
    key code 59
end tell
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.