Script Menu in Tiger: non-persistent property bug?
Script Menu in Tiger: non-persistent property bug?
- Subject: Script Menu in Tiger: non-persistent property bug?
- From: kai <email@hidden>
- Date: Sun, 7 Aug 2005 13:06:05 +0100
Just having a great time wading through some old scripts that broke
in my last upgrade... ;-)
One thing was puzzling me particularly: When run from the Script
Menu, some scripts were retaining changed properties - while others
weren't. All scripts worked as expected when run as an application,
or from Script Editor - but not (in every case) from the Script Menu.
After much digging (not to mention some head-banging), I believe that
I may have identified the differentiating factor between those
scripts that work correctly and those that don't. If the script
returns a value (almost any value, as far as I can tell), then
changed properties will persist. However, if the script's final
operation doesn't return a value, it's a rather different story.
If I'm right, then there's an obvious workaround (simply get the
affected scripts to return a dummy final value). However, since this
seems to be a bug, I wondered if any of you guys could shed a little
more light on it - namely:
1) Has this behaviour already been identified/reported (to your
knowledge)?
2) If not, can you replicate it on your machine (or is it just mine
that's gone gaga)?
To demonstrate the problem, I've distilled it down to the following
snippet:
--------------
property n : 1
display dialog "Test #" & n
set n to n + 1
if n < 4 then n
--------------
This should be saved as a compiled script and then run more than 3
times from the Script Menu. The first 3 runs are successful here,
incrementing the value of the property (n) each time. After that, the
dialog sticks on "Test #3" (since, from the third run, the
conditional statement returns no value).
For the record, I'm testing in OS 10.4.2 / AS1.10 (system upgrade,
not clean install).
Thanks for any insight you might be able to offer...
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden