So I finally upgraded to Tiger, and everything's been smooth except now my RSS News Headlines script doesn't seem to be working. It does that thing where you type the keyword (%_rss), and it just thinks it's typing forever, but never sends anything.
What's weird is that all of the individual components work: if I open the substitute script in Script Editor and call substitute(), the results that it returns are totally correct; if I comment out the whole thing and just have it return static text, the keyword correctly substitutes it in Adium. Does anyone have any thoughts on why this might be happening? Thanks!
Oh, I'm running r12955, but all other scripts (including those that return links) work fine.
My RSS Newsreader script stopped working (Tiger?)
- zaudragon
- Growl Team
- Posts: 1852
- Joined: Sat Dec 04, 2004 5:05 am
- Location: Kensington, CA, USA
- Contact:
Eh? Yeah, it stalls and eveytually crashes. Tried it before…noleli wrote:The reason I don't think it's a problem with the plist is that if I change the subsitute function to just return a static string of text, it subs into Adium fine.
If Adium gets poorly formed HTML, does is exhibit the behavior I described?
Actually, it seems like a problem with the fact that "do shell script" always uses sh, and Adium seems to be using a different shell.
The above code works fine from script editor, but not in Adium. (Adium isn't actually crashing; it will show me as typing indefinitely, or until I send something else.)
If I specify a full path (i.e. not using $HOME), it works in Script Editor and Adium. This seems to be a change in Tiger.
Code: Select all
on substitute()
set HLfile to "$HOME\"/Library/Application Support/Adium 2.0/Scripts/RSS News Headlines.AdiumScripts/Contents/Resources/headline.txt\""
--headline.txt contains the text of the RSS headline
set URLfile to "$HOME\"/Library/Application Support/Adium 2.0/Scripts/RSS News Headlines.AdiumScripts/Contents/Resources/url.txt\""
--url.txt contains the url of the RSS article
set theHeadline to do shell script "more " & HLfile
set theURL to do shell script "more " & URLfile
set theLink to "<HTML><A HREF=\"" & theURL & "\">" & theHeadline & "</A></HTML>"
return theLink
end substituteIf I specify a full path (i.e. not using $HOME), it works in Script Editor and Adium. This seems to be a change in Tiger.
- evands
- Cocoaforge Admin
- Posts: 3152
- Joined: Thu Dec 02, 2004 10:55 pm
- Location: Decatur, GA
- Contact:
Use
to get the application suport folder.
Code: Select all
path to application support folder from user domain as string
- zaudragon
- Growl Team
- Posts: 1852
- Joined: Sat Dec 04, 2004 5:05 am
- Location: Kensington, CA, USA
- Contact:
noleli wrote:Sweet! Thanks. Is there any way I can use that to return the Unix path instead of the old-school MacOS path with the colons? I'm using it in a "do shell script".
Code: Select all
POSIX path of (path to application support folder from user domain as string)