shell script in AppleScript ?
shell script in AppleScript ?
- Subject: shell script in AppleScript ?
- From: Caroline <email@hidden>
- Date: Fri, 18 Jan 2008 14:50:21 +0900
- Importance: normal
I'm using NSAppleScript & "do shell script" in my Cocoa App.
But, I have some problems.
In Terminal,
script is -> cmd option "Picture 1" "Picture 2".
It is good.
But in cocoa App,
script is -> NSString *sCmd = @"cmd option \"Picture 1\" \"Picture 2\";
NSAppleScript *script = [NSAppleScript alloc] initWithSource:[NSString strintWithFormat:@"do shell script %@",sCmd]];
Using '\"' because whitespace. (between Picture and 1)
It has error.
(NSAppleScriptErrorMessage : "A identifier can\U2019t go after this \U201c\"\U201d.";)
How can I deal whitespace?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden