• 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
Re: Keychain and text returned
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keychain and text returned


  • Subject: Re: Keychain and text returned
  • From: John Cochrane <email@hidden>
  • Date: Wed, 30 Mar 2005 21:37:37 +1000

Many thanks Neil and Kai

the shortest solution is Kai's:

set {text:keyName} to text returned of (display dialog "What is the name of the key?" default answer "server" buttons {"OK"}) as text

tell application "Keychain Scripting"
	tell the current keychain
		set theKey to (key 1 whose name is keyName)
	end tell
end tell

I had previously unsuccessfully tried the first line as:

set keyName to the text returned of (display dialog "What is the name of the key?" default answer "server" buttons {"OK"}) as text

which as Neil explained will still fail.
I'm still don't understand why simply coercing to text does fail but I will seek enlightenment from the ASS archives as Neil suggested.


Thanks again for the helpful replies

John Cochrane

_______________________________________________
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


  • Prev by Date: Re: controlling battery charge limits
  • Next by Date: Importing vcards into address,moving last import group to another group
  • Previous by thread: Re: Keychain and text returned
  • Next by thread: Re: Keychain and text returned
  • Index(es):
    • Date
    • Thread