Page 1 of 1

Adiumscript no longer shows dialog boxes or choose frm lists

Posted: Thu Sep 22, 2005 11:54 pm
by mtimmsj
I was trying to use the UnInstall Adiumscript on the xtras site and noticed that in 0.84 it doesn't work anymore, it does work if run outside of adium or if run in Adium 0.82.

I did some testing and found that if I do the following:

Code: Select all

do shell script "logger \"Test\""
display dialog "Test"
do shell script "logger \"Test\""
Only the first shell script is run. The dialog box never appears and the second shell script is never run.

This also affects the 'choose from list' applescript construct which is why the UnInstall xtra fails to function.

I see that ticket #1320 mentions a pretty significant change in the way that applescripts are run from adium. I'm wondering if this change resulted in a regression where dialog boxes no longer work.

I can't seem to find any tickets for this type of problem. Has anyone seen it before?

Thanks.

Posted: Fri Sep 23, 2005 12:43 am
by evands
You need to tell application "Adium"

Thanks!

Posted: Fri Sep 23, 2005 12:56 am
by mtimmsj
That works.

do shell script needs this too

Posted: Fri Sep 23, 2005 1:26 am
by mtimmsj
FYI for those that may run into this. I found that some shell scripts that used to work in 0.82 from an adiumscript stopped working because the shell enviornment is no longer the same.

If you want the shell environment to be the way it used to be in the 'do shell script' via an adiumscript, you need to wrap it in a 'tell application "Adium"' as well.

Posted: Fri Sep 23, 2005 1:51 am
by evands
Yeah.. I'm not sure if there's a way around this. We moved to using a separate task to run the applescript, due to serious problems running them regularly (such as happens with auto-refreshing away messages/display names/profiles) within the app... and that, as you saw, changed the default 'tell' target and the shell environment.