• 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: How to direct text output to a window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to direct text output to a window


  • Subject: Re: How to direct text output to a window
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 16 Mar 2008 08:24:27 -0700

On Mar 16, 2008, at 8:13 AM, Stranathan, Dan wrote:

I'm stumped as to how to direct the information to a dialog window. I can get the info when running the app in Script Editor, but obviously need to direct the output to a user-readable dialog box or window during runtime. I'm obviously new to AppleScript - my apologizes.

Two solutions occur to me.

First:

tell application "System Events"
	set foo to name of login items
end tell
set text item delimiters to return
display dialog foo as text

Second:

tell application "System Events"
	set foo to name of login items
end tell
choose from list foo

Which to use depends on how many items there are; the first will create a very tall window, maybe too tall for the monitor, if there are a lot of items. The second will create a scrolling list. It is also dependent on whether you want the user to be able to select any of the names; if so, then the second one is the one to use.

--
"Other than telling us how to live, think, marry, pray, vote, invest, educate our children and, now, die, I think the Republicans have done a fine job of getting government out of our personal lives."


--Craig Carter

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: How to direct text output to a window
      • From: Skeeve <email@hidden>
References: 
 >How to direct text output to a window (From: "Stranathan, Dan" <email@hidden>)

  • Prev by Date: Re: How to direct text output to a window
  • Next by Date: Re: 10.4.9 versus 10.4.10
  • Previous by thread: Re: How to direct text output to a window
  • Next by thread: Re: How to direct text output to a window
  • Index(es):
    • Date
    • Thread