Re: launch safari to open an url
Re: launch safari to open an url
- Subject: Re: launch safari to open an url
- From: Daniel Jalkut <email@hidden>
- Date: Sat, 14 May 2005 22:27:04 -0700
I think you should be able to access AppKit from a command line tool,
but in this case I would stick to the lower level services from
LaunchServices.
Search on LSOpenFromURLSpec. You can specify the application and URL
in that spec and ask the system to do the work for you.
Daniel
On May 14, 2005, at 8:08 PM, Hernan Ochoa wrote:
I have a command-line tool that uses the Core framework.
Can I use NSWorkspace from such an application?
I'm trying to launch Safari and open and url with it.
I've tried doing this with execl(), but it is impossible.
./Safari http://www.google.com results in Safari opening
file://current_directory/http://www.google.com.
very frustrating.
so, I finally was able to do it with NSWorkspace
openUrl:withApplication:.
Can I use the NSWorkspace from a command-line tool Xcode project?
I tried addind the appkit framework to my project, but i can't get it
to work. doing an #include <AppKit/NSWorkspace.h> throws an error.
Thanks in advance.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden