Re: How to direct text output to a window
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