Re: Apple script from a c file
Re: Apple script from a c file
- Subject: Re: Apple script from a c file
- From: Markus Hitter <email@hidden>
- Date: Thu, 15 Sep 2005 11:50:16 +0200
Am 15.09.2005 um 07:41 schrieb Shreyas Srinivasan:
My apple script looks like this
tell application "Finder"
launch application "X11"
end tell
Any reason why you don't want to use NSWorkspace to launch the app
directly?
set results to do shell script "cd ~; DISPLAY=:0.0;
export DISPLAY; PATH=$PATH:/usr/local/bin; export PATH ;
/opt/gnome-2.12/bin/evolution-start.sh > /dev/null 2>&1 &"
A simple
system("cd ~; export DISPLAY=:0.0; export PATH=$PATH:/usr/local/
bin; /opt/gnome-2.12/bin/evolution-start.sh > /dev/null 2>&1 &");
in your C / Obj-C code should do as well. Take care for users using a
different than the default "bash" shell. If you need more control,
check popen(), exec() and NSTask.
I tried adding a main.scpt and removed the main.m
If you can get away without a main.m, a plain AppleScript, compiled
as an app, should do the same. No Xcode needed.
If you still feel the need for an embedded AppleScript, there's the
NSAppleScript class.
HTH,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden