Re: Cocoa Loco
Re: Cocoa Loco
- Subject: Re: Cocoa Loco
- From: Nigel Smith <email@hidden>
- Date: Mon, 03 Mar 2003 12:22:50 +0000
On 2/3/03 13:58, "John C. Welch" <email@hidden> wrote:
>
But even little things, things like reading line endings...
I don't think it is reading line endings that is the problem, but when you
set the TIDs, as this will demonstrate:
return ASCII number of return
--> 13
return ASCII number of "
"
--> 10
Your shell script returns line endings as ASCII character 13, you set the
TIDs to ASCII character 10, so you only get a one-item list. The "altering
line endings" parameter converts non-OSX line endings, eg OS9's ASCII 10, to
OSX's ASCII 13, so will have no effect in this case.
So the bug is that Cocoa (some Cocoa?) apps are considering (compiling?)
"Hello" & return & "World"
and
"Hello
World"
as different strings.
In your script, just use the return keyword when setting the TIDs, or even
shorten (if you just want to show the dialog) the script to:
property theInterfaceCountScript : "ifconfig | grep \"en[0-9]:\""
display dialog (count of paragraph of (do shell script
theInterfaceCountScript))
HTH,
Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.