Re: do shell script "sort" not working
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