Re: how to refer to environment variable in a Terminal do script?
Re: how to refer to environment variable in a Terminal do script?
- Subject: Re: how to refer to environment variable in a Terminal do script?
- From: Gonzalo Castro <email@hidden>
- Date: Mon, 3 Dec 2007 10:34:43 -0500
Date: Fri, 30 Nov 2007 17:31:48 -0500
From: "Mark J. Reed" <email@hidden>
Subject: Re: how to refer to environment variable in a Terminal do
script?
To: Skeeve <email@hidden>
Cc: AppleScript Users <email@hidden>
Message-ID:
<email@hidden>
Content-Type: text/plain; charset=UTF-8
On Nov 30, 2007 3:24 PM, Skeeve <email@hidden> wrote:
osascript <<'END OF SCRIPT'
tell app "Terminal"
activate
do script "export DISPLAY=:0.0;/path/to/toolToRun"
or just
do script "DISPLAY=:0.0 /path/to/tool/to/Run"
without the 'export' and semicolon.
--
Mark J. Reed <email@hidden>
Thanks for the replies but I guess I wasn't clear. What I want the
variable in the "do script" set to is not a constant, not :0.0. I
want the variable to have the same value, whatever it is, as the
variable in the shell calling the Apple Script.
#!/bin/sh
export $DISPLAY=:1.0
osascript -e 'tell app "Terminal" to activate' -e 'tell app
"Terminal" to do script "DISPLAY=$DISPLAY /path/to/toolToRun"'
Gonzalo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden