Monday, June 26, 2017

#1 2005-10-13 03:26:34 pm

From: Malasa√Īa, Madrid
Registered: 2002-11-20
Posts: 2014

How do I script the Chooser?

Much to the dismay of many, the Chooser is not scriptable. But thanks to scripting additions, there is a way to work around it. Look into the freeware S√?¬§ndi's Additions, which includes the command "type text" and allows simulated typing on the keyboard.

Suppose you wanted to choose a printer named "LaserWriter Select 360" in the Chooser.


tell application "Finder"
   open file ((path to apple menu items folder as text) & "Chooser")
   type text "L" -- selects the LaserWriter 8 icon
   type text tab -- move to the printer choices
   type text "LaserWriter Select 360 " -- selects the driver
   type text "q" holding down command -- quit the Chooser
   type text return -- to okay the choice
end tell

The printer has been chosen!

Filed under: Finder



Board footer

Powered by FluxBB

[ Generated in 0.034 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)