Re: osascript
Re: osascript
- Subject: Re: osascript
- From: Russ <email@hidden>
- Date: Thu, 25 Jul 2002 16:07:32 -0400
- Organization: Eh? Whats that?
I believe you want something like:
#!/bin/sh
osascript -e \"tell application \\\"$1\\\" to activate\"
I was recently doing something similar from Perl, so this may be a bit off in Shell...
Russ
+++ Simon Forster [25/07/02 20:17 +0100]:
>
Can anyone tell me why the shell script snippet:
>
>
#!/bin/sh
>
osascript -e 'tell application "'$1'" to activate'
>
>
fails when passed a two word argument from the command line but works
>
fine with a one word argument. I've tried echoing it back to the
>
terminal and it all looks absolutely fine such as:
>
>
osascript -e tell application "TextEdit" to activate
>
>
and
>
>
osascript -e tell application "Address Book" to activate
>
>
are echoed back. If I try too run it, the first version works fine, the
>
second doesn't - it fails with "syntax error: Expected string but found
>
end of script. (-2741)".
>
>
I'm sure I'm missing something simple.
>
>
TIA
>
>
Simon Forster
>
________________________________________________
>
LDML Ltd, 4/5 Hazlitt Mews, London, W14 0JZ, UK
>
<tel int="+44 70 9230 5244" uk="070 9230 5244">
>
<fax int="+44 70 9230 5247" uk="070 9230 5247">
>
<mailto:email@hidden>
>
________________________________________________
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >osascript (From: Simon Forster <email@hidden>) |