Simple Repeat until loop problem
Simple Repeat until loop problem
- Subject: Simple Repeat until loop problem
- From: Maccin <email@hidden>
- Date: Thu, 22 Dec 2005 12:24:32 -0500
Hello Everyone,
I have a newbie-ish question. I've been working on a script (my
first one) to automatically connect to one of my companies telnet
servers. Here is the script:
-- Get the client's Username
set the clientUserName to system attribute "USER"
-- Uncomment the following line to see what client username they are using
-- display dialog ("Using " & clientUserName & " as the VMS username.")
tell application "Finder" to tell application "Terminal" to activate
tell application "Terminal" to count windows
set numberOfWindows to (result + 1) as number -- do script will
automatically create a new --window so we need to add one to get the
reference
--display dialog ("There are " & numberOfWindows & " windows open.")
tell application "Terminal"
do script "ssh " & clientUserName & "@serverGoesHere; exit"
repeat until (busy of window numberOfWindows) is false
--stay in this loop until the script finishes
end repeat
display dialog ("Process Finished")
end tell
This script should stay in the repeat until loop while ssh is running.
When ssh quits the loop should end and the "Process Finished" dialog
should appear. However, when I run this script it will go through the
repeat look straight to the dialog-box. This happens even when I
change the bool to false. Any suggestions would be appreciated.
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden