Script for Eudora
Script for Eudora
- Subject: Script for Eudora
- From: John Delacour <email@hidden>
- Date: Fri, 28 Feb 2003 12:23:30 +0000
- Mac-eudora-version: 6.0a8
I think we'll know how serious Apple is about Applescript when every
cocoa application has its own hierarchical script menu and the
ability to assign keystrokes and buttons or both to the scripts.
Until that happens, I consider Applescript to have taken a huge step
back. The reason I did not adopt Applescript when it was first
brought out was that there was no useful user interface except for
Script Menu / OSA Menu and these were always unwieldy and full of
bugs. OS 10's ScriptMenu.menu is hardly any more useful and
personally I use it very rarely and for infrequently required tasks
only.
Perhaps someone from Apple can let us know what plans they have for
restoring a proper interface to Applescript. I feel that
applications like Mail and TextEdit have taken me right back into
ancient history and am reminded whenever I use them of the laborious
menu-driven operation of my first 128K Mac. This was greatly
relieved, even before QuicKeys, by the wonderful Nisus which has,
from the very beginning had keyboard shortcuts that allow two and
three character shortcuts -- something never matched by any other
application.
All the righteous protestations from the Apple reps that frequent
this list when they have nothing better to do cut no ice with me at
all. Scripters have been seriously let down by OS 10 and there is no
sign that anyone is really competent to put things right. Just to
read the code written by these new age folk is sickening. It goes
against the whole spirit of Applescript and breaks all the guidelines
that were painfully worked out by people like Cal Simone - bless his
heart!
The only good thing is that our favourite carbon apps can, for the
moment, continue to improve in scriptability and user-friendliness.
We have to ask why it is we have so few cocoa apps. Apart from
Unicode (which is extremely important to me at least) cocoa seems to
deliver nothing.
And now for something completely different....
Here's a script for Eudora -- nothing very exciting. Eudora scripts
belong in /Eudora.app/Contents/MacOS/Eudora Stuff/Scripts/. The
easiest way to get in there is to run a shell script:
do shell script "open /Appli*/Eudo*/Cont*/macos/*tuff/scripts/"
Eudora has two slight shortcomings compared with other apps, namely
that the Scripts menu is not dynamically updated (you need to
relaunch to register added scripts) and that it is not hierarchical.
However this weakness is more than counter-balanced by the most
configurable toolbar around, which allows scripts from the menu
(among other things) to be attached to buttons. The best layout for
the toolbar is vertical with names only or with names and small
icons. The width, height and spacing of the buttons are all
configurable.
To get the script below into the menu, save it in the folder above
and relaunch Eudora. Once you have configured your toolbar to your
taste, command-click between two buttons and you will be prompted to
choose a menu item. Select the script from the Scripts menu and it
will be added to the button. You can now run the script by clicking
the button.
It gets better: if you hate mice as well as menus, command drag the
button to one of the first 15 positions in the toolbar, make sure the
toolbar is configured to show function keys and to respond to them,
and hey presto! you can now change the font and size in Eudora, or
whatever else you want to do, with a single key stroke.
That's the sort of thing AS was invented for -- to make frequent
tasks fast and easy. And apps like BBEdit, Smile. T-E Plus etc. have
put it to good use. It's no good telling me that Mail is scriptable
and then telling that in order to run a script in mail I have to walk
100 yards to the garage, unlock a tool chest and search for a wrench.
Besides, until I can get the content of the front window in Mail I'm
not going to be told it's scriptable at all!
Hey ho
JD
(* Script "Set Font and Size"
to change the application font and size*)
tell app "Eudora"
set vCurrentSettings to setting 1 & space & setting 2
set vPrefs to paragraphs of "
Beijing 12
Geneva 12
Georgia 12
Lucida Grande 12
Monaco 9
Osaka 12
Taipei 12
Times New Roman 12"
set the first item in vPrefs to vCurrentSettings
tell me to set vChoice to "" & (choose from list vPrefs with prompt "
Set font/size to..." default items the vCurrentSettings)
if the vChoice is in {false, "false"} then return
set vSize to the last word of my vChoice
set l to the ((length of the vSize) + 2) * -1
set the vFont to text 1 through l of my vChoice
set {setting 1, setting 2} to {vFont, vSize}
activate
end
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.