[X4U] Random signatures - Solved

Charles Howse chowse at charter.net
Sat Nov 12 05:31:30 PST 2005


> Hi, 
> I use Entourage, but this might work in Mail.app.
> When I used Kmail in FreeBSD, I liked it's ability to run the output of a
> shell script as a signature.
> This script picks a random line from a text file of "redneck-ism's" and
> copies it to the clipboard.
> I created an AppleScript to run it from the Entourage Scripts menu, so all I
> have to do is open a new email, run the AppleScript, and paste it into my
> msg.
> I think it's neat, thought you might enjoy it.
> I haven't looked into a way to get the AppleScript to paste to the open
> email yet, so if anyone has a suggestion on that, I'd like to hear it.
> ___________
> #!/bin/sh
> 
> f=~/Documents/redneck.txt
> 
> n=`jot -r 1 1 1322`
> 
> sed -n $n\p $f | pbcopy
> __________

Well, there doesn't seem to be much interest in this topic, but I have
solved my 'paste' issue.
First, you must turn on 'Enable access for assistive devices' in System
Preferences/Universal Access.
Here is the AppleScript...

do shell script "/Users/Charles/bin/redneck_sig.sh"
tell application "Microsoft Entourage"
    tell application "System Events"
        tell process "Microsoft Entourage"
            click menu item "Paste" of menu "Edit" of menu bar item "Edit"
of menu bar 1
        end tell
    end tell
end tell

-- 
Charles

You might be a redneck if...
You¹ve ever carved a Jack-O-Lantern out of a basketball.





More information about the X4U mailing list