Sharing Applescripts
Sharing Applescripts
- Subject: Sharing Applescripts
- From: Michelle Steiner <email@hidden>
- Date: Mon, 3 May 2010 17:29:18 -0700
Where, in addition to macscripter.org and macoshints.com are good places to post a script that I want to share? I've already posted it to the former and am about to post it to the latter.
BTW, here it is:
MTNW allows only one signature per personality. This script will allow you to have a random script in each message. However, you have to manually run the script for each message.
Before running the script, create a file containing the sigs you wish to use. Place one sig on a line; multi-line sigs are not supported. Do not leave any blank lines in the file.
The first time you run the script, it will ask you to locate the sig file. (Also after any editing.) After that, if there is an outgoing message window open, there is no other user interface; it chooses a sig and places it in the outgoing message; otherwise, it alerts you that you need to have an outgoing message window open.
I compiled the script as a script file, not an application file, and placed it in ~/library/scripts/applications/MT-NewsWatcher I can then access it from the Applescript menu in the menu bar whenever MTNW is the frontmost application.
property theFile : missing value
tell application "MT-NewsWatcher"
try
set msg to message window 1
if theFile is missing value then set theFile to choose file with prompt "Choose the signatures file."
set sig to some paragraph of (read theFile)
set the signature of msg to the sig
on error
display alert "No outgoing message" message "You must have an outgoing message window open." as warning
end try
end tell
-- Michelle
-- The Bible contains six admonishments to homosexuals and three hundred, sixty-two admonishments to heterosexuals. That doesn’t mean that God doesn’t love heterosexuals. It’s just that they need more supervision. —Lynne Lavner
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden