Re: Applescript question
Re: Applescript question
- Subject: Re: Applescript question
- From: Graff <email@hidden>
- Date: Fri, 04 Jun 2004 11:58:23 -0400
You need to use multiple -e flags in one osascript call:
----
osascript -e 'set username to do shell script "whoami"' \
-e 'mount volume blah....' \
-e 'mount .....'
----
The backslashes at the end of each line are just the shell method of
breaking long lines into shorter ones.
- Ken
On Jun 4, 2004, at 10:36 AM, Betsy Ward wrote:
Hi,
I have a question, I'm trying to get a mount network drives script to
work
and am trying to put some commands from an applescript into a shell
script. The reason being that I can't get it to work in 10.3 using the
LoginHooks the way that it works in 10.2. So I'm planning on putting
it
in the profile to run after each user logs in.
Here's what's in the apple script:
set username to do shell script "whoami"
mount volume "afp://server/" & username on server "server" as user name
username
mount volume "afp://server/folder" on server "server" as user name
username
mount volume "afp://server/folder" on server "server" as user name
username
my question is that if I put this in a shell script how do I separate
the
different commands. For instance do I need to start each line with
osascript -e 'set username to do shell script "whoami"'
osascript -e 'mount volume blah....'
osascript -e 'mount .....'
Or can I do it all after one osascript -e command, like
osascript -e 'set username to do shell script "whoami"; mount volume
blah...; mount volume ....'
Does that make sense?
_______________________________________________
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.