Saturday, August 23, 2014

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

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

How can I manipulate non-scriptable applications? (pre OS X)

It's easy to launch a non-scriptable application but difficult to easily do anything too productive with it. Consider the following line:

Applescript:

tell application "SimpleText" to activate

This will launch "Simple Text" but having it do anything afterward would require scripting additions. A free Scripting Addition called S√?¬§ndi's Additions allows text to be typed, so we could do something like:

Applescript:

tell application "SimpleText"
   activate
   TypeText "Hello!"
end tell

To choose from menus, access dialog boxes, and do more would require other additions, or an all-in-one extension called PreFab Player.

In general, non-scriptable applications are cumbersome to deal with and more often than not a scriptable equivalent can be found; in this case the $15 shareware text editor Tex-Edit Plus is highly scriptable and offers other features Simple Text can only dream about!


Filed under: SimpleText

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.028 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)