Re: NSAppleScript question
Re: NSAppleScript question
- Subject: Re: NSAppleScript question
- From: cricket <email@hidden>
- Date: Thu, 24 Jul 2003 08:06:54 -0700
'saving to' needs a path or file reference. Are you sure it's not
working? It shouldn't speak the phrase, but save it to a file instead.
Given that you're not using a path, check the root directory of your
boot volume, which is where it will be written if you don't specify a
path.
- cricket
On Thursday, July 24, 2003, at 5:44 AM, Matthew Weinstein wrote:
Ok, I'm doing something wrong.
The following works as expected:
NSMutableString *as = [[NSMutableString alloc] init];
NSAppleScript *aa;
NSDictionary *errorInfo=0;
[as setString: @"say \"Hello world\""];
aa = [[NSAppleScript alloc] initWithSource: as];
if(![aa executeAndReturnError: &errorInfo])
[aa release];
But the following never succeeds:
NSMutableString *as = [[NSMutableString alloc] init];
NSAppleScript *aa;
NSDictionary *errorInfo=0;
[as setString: @"say \"Hello world\" saving to \"test.aiff\""];
aa = [[NSAppleScript alloc] initWithSource: as];
if(![aa executeAndReturnError: &errorInfo])
[aa release];
What am I doing wrong here? Am I missing something?
1000 thanks, Matthew
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
----->
Software Entomologist Mail for Mac OS X
http://www.apple.com/macosx/panther/mail.html
---------->
I don't like peas, and I'm glad I don't like them because if I liked
them I'd eat them, and I hate them.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.