Can't save compiled script
Can't save compiled script
- Subject: Can't save compiled script
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 09 Jan 2006 08:29:19 -0500
- Thread-topic: Can't save compiled script
I just discovered that this script can't be saved. When I go through the
usual Save As... routine, no matter what name I give it or where I try to
save it, it refuses to save. It doesn't appear in the Finder, and the script
window continues to have a dot in the Close button showing that it has not
been saved. No error message appears.
The compiled script works when I run it -- but only the second time I click
Script Editor's Run button.
set winner to "7"
display dialog "Pick a number from 1 to 10:" default answer ""
if text returned of result is winner then beep
Console reports this error upon attempting to compile the script:
2006-01-09 08:20:05.270 Script Editor[443] *** NSRunLoop ignoring exception
'*** -[NSCFString substringWithRange:]: Range or index out of bounds' that
raised during posting of delayed perform with target 61ace20 and selector
'updateElementsList:'
The problem continues to exist if I break the last line into two lines,
getting the text returned of result first and then testing the result
against 'winner'.
But if I change the last line of the original script by putting the Boolean
expression in parentheses, it all works and saves correctly.
What gives?
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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