• 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: do shell script "sort" not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script "sort" not working


  • Subject: Re: do shell script "sort" not working
  • From: Bruce Robertson <email@hidden>
  • Date: Thu, 10 Nov 2005 14:05:38 -0800

> set theList to {}
> repeat 100 times
>   set myletters to "abc"
>   set tempList to {}
>   repeat 4 times
>       set end of tempList to some item of myletters
>   end repeat
>   set end of theList to tempList as string
> end repeat
>
> set foo to procArray(theList)
> set AppleScript's text item delimiters to ASCII character 10
> set bar to do shell script "echo " & quoted form of (foo as string) & " |
> sort"
> set AppleScript's text item delimiters to {""}
> (count of foo) & return & bar
>
> on procArray(myArray)
>   tell application "Automator"
>       set theArray to call method "arrayWithArray:" of class "NSArray"
> with parameter myArray
>       set sArray to call method "distinct" of myArray
>   end tell
> end procArray
>
>
> I don't know if it is supposed to be used in this way as I only discovered
> it by tinkering. But it seems to get the job done whenever I call it.

Doesn't work for me. (10.4.3). "The fariable foo is undefined"

Shouldn't procArray() return something?

Even if I try to make it return something, still no result.

 _______________________________________________
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: do shell script "sort" not working
      • From: Martin Orpen <email@hidden>
References: 
 >Re: do shell script "sort" not working (From: Martin Orpen <email@hidden>)

  • Prev by Date: Re: Problems with Terminal on 10.4.3
  • Next by Date: Re: Problems with Terminal on 10.4.3
  • Previous by thread: Re: do shell script "sort" not working
  • Next by thread: Re: do shell script "sort" not working
  • Index(es):
    • Date
    • Thread