Re: Submitting Parameters
Re: Submitting Parameters
- Subject: Re: Submitting Parameters
- From: Doug McNutt <email@hidden>
- Date: Wed, 18 Apr 2007 11:01:41 -0600
At 17:38 +0200 4/18/07, Ronald Hofmann wrote:
>I´m calling an AppleScript from the command line:
>I want to submit a parameter which should be processed inside the script.
That's a question asked before and never really answered.
My osascripts tend to look like this:
osascript << ENDSCRIPT
tell application "Terminal"
do script "$WORK/bcheck1.tcsh" in window "$TWINDOW1"
do script "$WORK/bcheck2.tcsh" in window "$TWINDOW2"
end tell
ENDSCRIPT
The idea is that the $variables set up in the shell are evaluated just before the << here document is read. You can use AppleScript set commands with an evaluated argument that way. You can also set isanif="if" to avoid a nasty bug that prevents use of if statements in here documents. tcsh, as delivered by Apple, gets confused with its own if.
You can also write to a temporary file which will probably never leave RAM.
I have had some luck with a drag and drop applet that has several links to it. It determines what to do by which link received the dragged icons.
--
--> As a citizen of the USA if you see a federal outlay expressed in $billion then multiply it by 4 to approximate your share expressed in dollars. <--
_______________________________________________
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