Re: Timeout waiting for server process
Re: Timeout waiting for server process
- Subject: Re: Timeout waiting for server process
- From: John Stewart <email@hidden>
- Date: Tue, 7 Jan 2003 05:11:51 -0500
On Tuesday, January 7, 2003, at 03:04 AM, email@hidden wrote:
I've been using Applescript's "do shell script" command to sublaunch a
number
of unix calls. They all work fine except for the one call I invoke
which
requires username/password authentification. When I execute:
do shell script "mynextunixcall"
I get:
*** Timeout waiting for server process
***
What's strange is that it only takes about 4 seconds for me to enter my
username/password. I'm not sure why it's saying it's got a timeout.
I'm
also finding that the unix command is not getting executed, even
though the
authentification username/password portion is getting displayed.
Any advice on a workaround to this 1-liner is greatly appreciated.
_______________________________________________
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.
From the Standard additions osax -
do shell script: execute a shell script or command using the sh shell
(defined in: StandardAdditions.osax)
do shell script string -- the command or shell script to execute.
Examples are ls or /bin/ps -auxwww
[administrator privileges boolean] -- execute the command as the
administrator
[password string] -- use this administrator password to avoid a
password dialog
[altering line endings boolean] -- change all line endings to
Mac-style and trim a trailing one (default true)
[Result: string] -- the command output
--script
set pw to text returned of (display dialog "Enter your password:"
default answer "")
set somevar to do shell script "mynextunixcall" password pw with
administrator privileges
-- end script
As to why you are getting a 4 second timeout, I haven't a clue, is the
script inside a timeout clause? OTH as you have the script written it's
going to hand the shell command off to the "sh" shell and immediately
continue with the rest of the script. My re-write captures the result
of the shell script, you needn't use it but it's not a bad idea to
catch it as doing so tells AppleScript to wait until it's returned
before continuing.
John
_______________________________________________
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.