Re: X11 and do shell script
Re: X11 and do shell script
- Subject: Re: X11 and do shell script
- From: Laine Lee <email@hidden>
- Date: Sat, 27 Nov 2004 01:55:48 -0600
Title: Re: X11 and do shell script
Consider this. If you save it as an app bundle, you can even add an icon.
property tmpfile : "/tmp/execme"
set theShellScript to "export DISPLAY=:0;source /sw/bin/init.sh; /sw/bin/gimp-2.0 &"
tell application "X11" to activate
repeat
tell application "Finder"
set processlist to get name of every process
if processlist contains {"x11"} then
set _active to true
exit repeat
else
set _active to false
delay 3
end if
end tell
end repeat
do shell script "echo " & quoted form of theShellScript & " > " & tmpfile
do shell script "chmod +x " & tmpfile
if _active then
try
do shell script tmpfile & space & "> /dev/null 2>&1 &"
on error therr
display dialog therr
end try
end if
From: Bernardo Hoehl
do shell script "/Applications/OpenOffice.org1.0.3/program/soffice"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden