• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Simple Repeat until loop problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Simple Repeat until loop problem
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: Re: Finding lines containing foo in a file
  • Next by Date: Re: Simple Repeat until loop problem
  • Previous by thread: Re: how can script bundles store extra stuff?
  • Next by thread: Re: Simple Repeat until loop problem
  • Index(es):
    • Date
    • Thread