Re: NSApplescript
Re: NSApplescript
- Subject: Re: NSApplescript
- From: Brian Webster <email@hidden>
- Date: Thu, 3 Apr 2003 09:23:07 -0600
Applescript needs to have each command on a separate line, so try
throwing in some carriage returns, like so:
NSString *cmd = @"tell application \"iTunes\"\rlaunch\rplay\rend tell";
Also, I think that you don't actually have to explicitly tell iTunes to
launch, as it should do so automatically when you send the first
command to it. So "tell application \"iTunes\" to play" should also be
sufficient.
On Thursday, April 3, 2003, at 02:30 AM,
email@hidden wrote:
perhaps this is just an Applescript question, I am not sure...
But I have the following:
NSString *cmd = @"Tell application \"iTunes\" launch play end Tell"
NSAppleScript *aps = [[NSApplescript alloc] initWithSource: cmd]
[aps executeAndReturnError:nil];
The result is that iTunes launches, but it doesn't play. I tried
creating an
AppleScript app in PB and simple used the code in "cmd" and it too
only launched
iTunes without playing?
has anyone else had problems launching iTunes with Play?
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.