Re: Launching Internet Explorer from a Cocoa app
Re: Launching Internet Explorer from a Cocoa app
- Subject: Re: Launching Internet Explorer from a Cocoa app
- From: Andrew Mortensen <email@hidden>
- Date: Sat, 23 Mar 2002 17:32:21 -0500 (EST)
Don't use NSTask to launch IE. That's not what NSTask is for. I don't
think you're going to be trying to communicate with IE, aside from
launching it. Use:
[[ NSWorkspace sharedWorkspace ] openFile: @"Internet Explorer.app" ];
Items in /Applications don't need the full path using the openFile:
method.
andrew
On Sat, 23 Mar 2002, Alex Nygren wrote:
>
Hi there,
>
>
I need help...I am having trouble launching Internet Explorer using NSTask.
>
As an example of how I am trying to do it:
>
>
[args addObject:[NSString stringWithCString:"www.mac.com"]];
>
>
[aTask setCurrentDirectoryPath:@"/"];
>
[aTask setLaunchPath:@"/Applications/Internet
>
Explorer.app/Contents/MacOS/Internet Explorer"];
>
[aTask setArguments:args];
>
[aTask launch];
>
>
Now, Internet Explorer is a special type of file, not a standard executable:
>
>
bash-2.05$ file "/Applications/Internet Explorer.app/Contents/MacOS/Internet
>
Explorer"
>
/Applications/Internet Explorer.app/Contents/MacOS/Internet Explorer: CFM
>
binary
>
>
As opposed to a regular app:
>
>
bash-2.05$ file /Applications/TextEdit.app/Contents/MacOS/TextEdit
>
/Applications/TextEdit.app/Contents/MacOS/TextEdit: Mach-O executable ppc
>
>
The above code works with TextEdit. Microsoft always has to be different!;)
>
>
Any ideas on how to get Explorer to Launch?
>
>
Cheers,
>
Alex
>
_______________________________________________
>
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.
_______________________________________________
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.