|
|
A real random fortune signature for Mail.app
Instead of doing a command line install of Fortune, you could download Cocoa Fortune. Then run the shell script as: cd "/Applications/Cocoa Fortune/Cocoa Fortune.app/Contents/MacOS";./fortune;
That way fortune is all wrapped up in a nice little package (that contains a GUI too), and there's no need to go to the command line if you don't want to.
A real random fortune signature for Mail.app
for we of the GUI, please elaborate.
A real random fortune signature for Mail.app
Change the code of the given AppleScript to:
set fortune to do shell script "cd "/Applications/Cocoa Fortune/Cocoa Fortune.app/Contents/MacOS" ; ./fortune;"
tell application "Mail"
set content of signatures to "--
Real Name
" & fortune
end tell
A real random fortune signature for Mail.app
Blah, I forgot that I need to include formatting:
set fortune to do shell script "t "cd "/Applications/Cocoa Fortune/Cocoa Fortune.app/Contents/MacOS" ; ./fortune;"
A real random fortune signature for Mail.app
looks like applescript...but, doesnt compile :(
A real random fortune signature for Mail.app
When using quotation marks in the do shell script command of applescript, you have to escape them with a \. So it should be: set fortune to do shell script "cd \"/Applications/Cocoa Fortune/Cocoa Fortune.app/Contents/MacOS\" ; ./fortune;"
A real random fortune signature for Mail.app
Oops, have to escape them with
So your code will look like this:
A real random fortune signature for Mail.app
And how about changing that ';' to an '&&', so if the CD fails (because the program is gone or something), the 'fortune' command isn't attempted? So you get:
A real random fortune signature for Mail.app
As the developer of Cocoa Fortune, I do feel like I need to respond to that ;-). You did, after all, imply that my program was badly written. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.15 seconds |
|