AutoType / AutoClick
Tools for macintosh input automation!
Applescript is a really great way to control your mac! Unfortunately many
many applications still aren't scriptable. Thats why you need AutoType.
It allows you to control even non-scriptable applications from within Applescript.
Using AutoType you can send simulated key strokes to the front application.
This means you can control dialog boxes, hit menu short-cuts, or do anything
else that can be done from the keyboard. AutoClick allows you to send simulated
mouse clicks to any spot on the screen.
Note, AutoType is now free.
Download trial version (A-Z keys only) -
Download complete version -
I've had reports that it does not. I have no personal experience. I'm interested in anyone who got it to work. I'd be willing to make the source available to someone who wanted to port it. I have no idea whether this would be a difficult task, since I don't know about the new system architecture.
>>I think I may have found a limitation in the Autotype scripting
>>addition. I'm writing AppleScripts for QuickTime Player Pro 4.1 which
>>has a limited set of AppleScript commands. My script is to automate
>>the adding of a QuickTime movie into another QuickTime movie using
>>either Add (Option-Command-V) or Add Scaled (Shift-Command-Option-V).
>>Add works fine (Autotype "V" holding "Option Command"), but the Add
>>Scaled (Autotype "V" holding "Shift Option Command") does not.
And the solution from Sal at Apple:
this works for adding scaled:
tell application "QuickTime Player"
AutoType "`#118" holding "command shift option"
When you give a direct sequence of letters, autotype assumes these are
the right ascii codes and passes them through in the event record. It also
sets the event record flags for the modifier keys you specify. When you
use the keycode method of specifying a key, then autotype uses the current
keyboard definition to determine the correct ascii value. In some cases
the behavior can be different. If you don't get what you want, try specifying
in several different ways. See the docs that came with autotype for more
details on specifying things in this way.
tell application "finder" of machine "X" of zone "Y" autotype end tellYou should be able to send to the finder regardless of the destination front app.
I've also been told that
" Just wanted to inform you that Speed Doubler (or at least the version I have, v8) also lets you access menus with the keyboard. It's commercial, but many people have it, so you should probably add it to your AutoType FAQ. Also, there's an AS Addition called MenuEvents (check for it on MacDownload) that lets me access menus directly from my script. "
-- Example of doing it WRONG tell application "foo" activate autotype "S" holding "command" autotype "myfile" autotype "`return" end tell -- Example of doing it RIGHT tell application "foo" activate end tell autotype "S" holding "command" autotype "myfile" autotype "`return"You can not put the autotype calls inside a 'tell application' block. To understand why this is true you need to think about the flow of CPU control. The applications on your macintosh share CPU resources in a cooperative manner. One application gets an event, processes it, and then asks for another. Whenever an application asks for another event, the MacOS might let some other application do some work before returning control. But when an application is sitting in a dialog box, typically it only knows how to handle typing events, and ignores all others until the dialog box is finished. If you have told an application to run a script for you, then all processing of that script stops until after the dialog box. The key then is to make sure the application running the script is not the same one receiving the typing and bringing up dialog boxes. So don't tell application foo to perform the autotype commands, something else should do that. The applet, the script editor, the finder, anyone else. The following example might help someone.
Script Editor Application Foo ------------- --------------- Start running the script tell application foo Send event activate to foo Check for next line/event Recieve the activate event activate Brings itself to front Check events end tell autotype "s" holding "command" Invoke Save Dialog Check typing events only autotype "myfile" "myfile" is typed Check typing events only autotype "`return" Close save dialog Check all eventsNow lets consider what happens in the wrong case
Script Editor Application Foo ------------- --------------- Start running the script tell application foo Send event activate to foo Check for next line/event Recieve the activate event activate Brings itself to front Check all events Send autotype to foo autotype "s" holding "command" Check all events Invoke Save Dialog Check typing events only Foo is looking for typing and doesn't know how to handle the next autotype event at this point so it just sits waiting
You don't anymore. I asked for payment in the past when I was a student.
I'll take checks that pay in US$, or cash from anywhere in the world.
is probably the easiest for me, but suit yourself.