Dock Icons Emoticons Contact List Styles Message Styles Sound Sets AppleScripts Status Icons Service Icons Menu Bar Icons Plugins Miscellaneous All


Submitted By Andrew A. (cowgomoo)


fortune is an AppleScript that inserts a random fortune into your IM conversation. It contains the following modules:
  • %_fortune: simply picks a fortune from a list embedded in the script.

  • %_runfortune: for people who have the fortune package installed, this runs the shell command, meaning that the fortune is being pulled from a MUCH bigger database. No longer selects from offensive fortunes.

  • %_pickfortune{fortune_parameters}: also for those with fortune installed, this allows you to specify from which fortune file you wish to take your fortune and many other options (open up a Terminal window and type man fortune at the prompt for a list of options).

Note: By default, the %_runfortune and %_pickfortune scripts look for the fortune program in /sw/bin/fortune, its location if you install it via fink. If you installed fortune in another location, you can change where the script looks by navigating to ~/Library/Application Support/Adium 2.0/Scripts, control-clicking (or right-clicking) on fortune.AdiumScripts, choosing Show Package Contents, then navigating into Contents/Resources. You will see a text file called prefs. To change where the script looks, open this file in your preferred text editor, put the path to your instance of fortune on the top line (you can delete the rest of the text if you wish), save the file, and you're good to go.

If you're unsure where your instance of fortune is, follow the instructions in the file, the important part of which is to run which fortune in the Terminal. It'll show you the full path to fortune. That's the path you want to put in the file.


Version 1.4.1
  • The path specified in the prefs file now applies to both %_pickfortune{} and %_runfortune.
  • Included instructions within the prefs text document.

Version 1.4
  • Cosmetic fixes to %_pickfortune (got rid of the extra curly braces when choosing %_pickfortune from the Insert Script submenu).
  • Less intrusive (though only slightly) way to change location of installed fortune program (see note above).
  • No longer any need to put a leading space in the %_pickfortune parameters.

Version 1.3a
  • Changed %command to %_command so that the scripts conform to the new Adium way. Allows scripts to be called in profile, mid-line, etc. In short, everything should work again. Sorry for the delay in getting it working again.

Version 1.3
  • Changed /command to %command so that the script can be called in midsentence (if desired)
  • %runfortune now runs with the -s option, so fortunes are limited to 160 characters

Version 1.2
  • /runfortune no longer selects from offensive fortunes

Version 1.1
  • added /pickfortune{filenames/options} script courtesy of Zachary Heaton

Version 1.0
  • Initial release.


You can reply to individual comments by clicking the "Reply" link next to each.

# by on 09/09/04 at 02:25:02

Pure Brilliance. Download it now!

# by Matt on 01/12/05 at 22:36:59

I liked it mostly, but I had to change the fortune so it wouldn't send offensive fortunes. I was quite embarrased when it sent an emabarrasing fortune to someone I knew (that is run fortune instead of fortune -as)

# by on 01/12/05 at 23:09:12

FYI to use /pickfortune you must include the brackets..

i.e '/pickfortune{simpsons}' - assuming you have the simpsons fortune file in /sw/share/fortunes/

# by zaudragon on 01/25/05 at 06:52:17

Please don't hard code things! Say "'/sw/share/fortunes' is the default" and then give instructions on how to change it

# by zaudragon on 01/25/05 at 23:48:28

Or tell people to type in the full POSIX path

# by on 04/20/05 at 23:46:37

Using the fortune program from fink, I'm getting error messages saying that my away message is too long. The default fortune command should limit messages to 1000 characters.

# by on 05/05/05 at 09:04:59

Any idea on how i can run this on a periodic interval. I mean if i want to put it in my away name but change it every 5 minutes.

# by zaudragon on 10/05/05 at 19:31:07

Jim: that would be very elaborate like my Ramdam++ and RandIcons scripts. That was some nasty code too…

# by loadedsith on 02/07/08 at 07:11:47

I love it, i used to run this as my away on gaim when i was running various flavors of linux
To get the command line running i downloaded and followed the directions to install:
Then ran these 3 commands in
mkdir /sw
mkdir /sw/bin
ln -s /usr/bin/fortune /sw/bin/

# by cowgomoo on 05/02/08 at 06:02:31

Thanks for the endorsement, loadedsith. Just a note that you can change where the script looks for your fortune binary. Inside the actual AdiumScripts bundle is a text file called prefs. the first line of that text file is the path name of your fortune install. so if you change that, there's no need for empty folder structures or symlinks.

Post a New Comment

You must be logged in to post comments.

Install | Download
29.55kb (2269 downloads)

3.10 / 121 votes
Current Version: 1.4.1
Last Updated: 03/27/08
fortune based on randompun by tim d. ||| runfortune by xpander. ||| pickfortune by Zachary Heaton.