• 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: Sorting characters of the text - script doesn't work as expected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting characters of the text - script doesn't work as expected


  • Subject: Re: Sorting characters of the text - script doesn't work as expected
  • From: 2551phil <email@hidden>
  • Date: Sun, 16 Apr 2017 13:43:40 +0700


On 16 Apr 2017, at 06:50, ILJA SHEBALIN <email@hidden> wrote:

 either gives error "Variable GreekCharactersCount not defined"

This sounds like a problem of scope or you’re relying on an if-clause to fill the value, but in one pass through the loop there is no value, so later commands that rely on it are failing.

I usually avoid these pitfalls before I even start by defining default values for all my variables. I usually set my default to some impossible real value (eg. if it’s text, “default value”) so that I can tell straight away if the script has failed.

If you’re using Apple’s script editor, you might also want to throw in lots of “log “ & variable name statements in your script to see what’s happening.


Best


Phil
@sqwarq

 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Sorting characters of the text - script doesn't work as expected (From: ILJA SHEBALIN <email@hidden>)

  • Prev by Date: Sorting characters of the text - script doesn't work as expected
  • Next by Date: Re: Sorting characters of the text - script doesn't work as expected
  • Previous by thread: Sorting characters of the text - script doesn't work as expected
  • Next by thread: Re: Sorting characters of the text - script doesn't work as expected
  • Index(es):
    • Date
    • Thread