Re: I betray my ignorance - help please
Re: I betray my ignorance - help please
- Subject: Re: I betray my ignorance - help please
- From: David Simerly <email@hidden>
- Date: Mon, 10 Sep 2001 09:58:09 -0700
- Url: http://www.digital-native.com
on Mon, 10 Sep 2001 11:28:14 +0100, Frank Barlow at <email@hidden> wrote:
>
I was just about able to drive HyperCard using the "HyperCard Script
>
Language Guide". I have not found an equivalent book for Apple
>
Script. What do you recommend?
You got a couple of good pointers in other posts, and I'll second
"AppleScript in a Nutshell." One source I didn't see mentioned is, "The
AppleScript Guidebook." It's a set of Apple Help modules which you can
install as a set, or as individual topics. The first module is a beginners
tutorial. You can find the Guidebook at:
<
http://www.apple.com/applescript/help_mods.html
>
Are there an Apple Script equivalents to the HyperCard "Ask" and
>
"Answer" commands?
Yes, but they operate quite differently from HC. You can do both Ask and
Answer using the "display dialog" scripting addition (aka: OSAX), like so
(these commands should be single lines, so watch for <CR>'s inserted by
e-mail):
-- ask the question...
set the_answer to text returned of (display dialog "What's the answer to
life, the universe, and everything?" default answer "42")
-- display then answer...
display dialog "Here's the answer to life, the universe, and everything: " &
the_answer buttons "OK" default button "OK" with icon 1
There's a lot more you can do with display dialog like adding up to three
buttons in the "answer" variant, getting the button clicked by the user, and
trapping for cancel. It's all documented in the scripting addition's
dictionary, and in the Apple Guidebook. Good luck!
DS
______________________________________
Digital Native
Your guide through the virtual jungle.
______________________________________
"Laws are the spider's webs which, if anything small falls into them they
ensnare it, but large things break through and escape."
-- Solon, statesman (c. 638-c558 BCE)