do script for background application...
do script for background application...
- Subject: do script for background application...
- From: David Crowe <email@hidden>
- Date: Fri, 8 Nov 2002 16:16:42 -0700
I'm trying to run an application (vpnclient) in the background via AppleScript:
The script below has a few flaws....
-- Run vpnclient. The VPN will be disconnected if this app quits
activate
display dialog "Enter password: " default answer "" default button 1
set thePassword to text returned of the result
with timeout of 30 seconds
do shell script "yes | /Applications/vpnclient/vpnclient
connect xxvpn user myusername pwd " & thePassword
end timeout
Flaws:
1. "display dialog" doesn't appear to have a way to not echo back the input.
2. The script hangs, and does not timeout. The dock shows "application not
responding" for it. It does start the vpnclient application, however.
If anybody knows how to fix those flaws, I would appreciate it.
Also, a more general question. Is there any way to run a shell script
independently of the script (i.e. not terminate with the script)?
- Dave
_______________________________________________
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.