Osax me here!
Osax me here!
- Subject: Osax me here!
- From: John Delacour <email@hidden>
- Date: Sun, 25 Aug 2002 21:42:42 +0100
Here's a script for your Eudora Scripts folder to celebrate the
return of our beloved old osaxes to OS X.ii, unless I've misread the
doc.
We are certainly living in interesting times, and not before time!
Another year of the old rubbish from Apple and I'd have packed in the
Mac for good.
But first a tip: the Scripts Folder has to be in Eudora Stuff, but
now Eudora Stuff is truly stuffed inside Eudora.app, so keep your
scripts in a folder names Scripts in your Eudora folder (where the
mailboxes are) and make an alias to it named "Scripts" in Eudora
Stuff. Or do it the other way round.
This script allows you to switch between editable From lines and
uneditable ones either globally or for just one message.
tell app "Eudora"
(* Die if no outgoing message is frontmost *)
try
if not (get outgoing of message "") then return
on error noMessage
return
end try
set s to field "From" of message ""
set vFrom to text (2 + (offset of ":" in s)) through -1 of s
set vEditable to setting 114 is "y"
set vIcon to 1001
end tell
(*****)
if not vEditable then -- prepare the dialog
set ppt to "
Do you want to be able to edit the From field"
set ppt to ppt & " in all outgoing messages?"
set vBtns to {"Yes, always allow", "Just this message"}
else -- the From field is already editable
set vBtns to {"Don't allow it", "OK"}
set ppt to "
You are already allowed to edit the From field in outgoing messages."
set vIcon to 0
end if -- dialog ready
(*****)
set b to the last item in vBtns
set dd to display dialog ppt buttons vBtns default button b with icon vIcon
set vBtn to dd's button returned
if vBtn is "Don't allow it" then
tell app "Eudora" to set setting 114 to "n"
return
end if
(*****)
if vBtn is "Just this message" then
set ppt to "
Change the From field in this message to"
try
set dlog to display dialog ppt default answer vFrom with icon vIcon
on error vCancel
return
end try
set vFrom to dlog's text returned
if dlog's button returned is "Just this message" then
set vIcon to 1001
tell app "Eudora" to set message 1's field "From" to vFrom
return
end if
end if
if vBtn is "Yes, always allow" then
tell app "Eudora" to set setting 114 to "y"
end if
if vBtn is "Don't allow it" then
tell app "Eudora" to set setting 114 to "n"
end if
-- JD
_______________________________________________
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.