QuoteDB |
|
Submitted By Octavarius |
DescriptionThis is a generic random quote generation script. It takes a file containing a collection of quotes and then returns a random quote from that file. The quotes in the file should be separated by a new line, a dash, and then another new line (as in the example below).In Adium, you have to tell the script which file contains your quotes. You pass the file path in Applescript format, and that file is parsed; if no file path is passed, nothing is output. For example, in Adium you would type: %_quotedb{iMac:users:nate:desktop:quotes:db1.txt} This would tell the script to parse the 'db1.txt' file; so, db1.txt should look something like: This is quote #1. - This is quote #2. - This is quote #3. The script would open the file ('db1.txt') and return one of the three quotes. Made it as a quick & easy way to incorporate various quote sets through one command without ever having to look at AppleScript files and such. Probably more useful in profiles than in live conversations. Feel free to leave feedback by voting, or request features by leaving comments. ChangesImproved support for multi-line quotes.CommentsYou can reply to individual comments by clicking the "Reply" link next to each. # by rnmoak on 10/03/06 at 21:03:06I thing this a excelent script, but I'm having some problems with the path, since I'm not sure how is the path in "AppleScript path format". My file is under /Users/ricardocarvalho/Documents. The UpperCase matters? Thanks!
# by Octavarius on 10/04/06 at 04:50:45All you do is replace the slashes with colons; so your path would be :Users:recardocarvalho:Documents:filename
Post a New CommentYou must be logged in to post comments. |
# by Andrman on 05/09/06 at 15:53:26
I noticed, and it could be another Xtra I have installed... but after using this, Adium seems to be a bit less responsive, and when I first sign on it takes a looong time for people's away messages to change from "Away" to whatever they really set as their away message.
# by Octavarius on 05/09/06 at 18:41:20
I was considering putting some time into adding numerical aliasing -- meaning you could use some function, say /alias{}, that would allow you to associate a file path with a number. For example, one could type
[code]/alias{1, iMac:users:nate:desktop:quotes:db.txt}[/code]
and then
[code]/quotedb{1}[/code]
I would only do this if I thought there was enough interest in it, since it would take some time and it doesn't look like too many people use it. But this feature would make it more practical to use in the actual message window, so maybe I will.