• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Launching Internet Explorer from a Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Launching Internet Explorer from a Cocoa app (From: Alex Nygren <email@hidden>)

  • Prev by Date: Re: CADO: Cocoa Application Developers Organization?
  • Next by Date: Re(2): CADO: Cocoa Application Developers Organization?
  • Previous by thread: Launching Internet Explorer from a Cocoa app
  • Next by thread: Re: Launching Internet Explorer from a Cocoa app
  • Index(es):
    • Date
    • Thread