• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't save compiled script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't save compiled script


  • Subject: Re: Can't save compiled script
  • From: deivy petrescu <email@hidden>
  • Date: Mon, 9 Jan 2006 13:35:25 -0500


On Jan 9, 2006, at 8:29, Bill Cheeseman wrote:

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

Works fine here. Runs and saves fine! Also not a hitch with if "" is "" then ... I've restarted SE and tried with a fresh version, not a hitch.

Here: 10.4.3
SE 2.1.1 (81)
AS 1.10.3


Deivy _______________________________________________ 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
  • Follow-Ups:
    • Re: Can't save compiled script
      • From: Andrea -XFox- Govoni <email@hidden>
References: 
 >Can't save compiled script (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: "path to resource" in a tell Finder statement doesn't work
  • Next by Date: Select app bundle as folder via choose folder?
  • Previous by thread: Re: Can't save compiled script
  • Next by thread: Re: Can't save compiled script
  • Index(es):
    • Date
    • Thread