4.2.8:Ask Question Dialog – for asking a question

アスク・クエスチョン・ダイアログ(質問用)

The ask question dialog is a special type of window that is designed to make it easy to ask the user a question. It includes special simple syntax for opening the dialog, specifying the question text and returning the answer to the script that called it. You can also specify the window title, as well as an icon to be displayed in the window. The font, object positions, button order and icon will
automatically change to reflect the operating system. However, if you do require more flexibility than is provided in this dialog, you should create your own modal dialog box instead (see above).

アスク・クエスチョン・ダイアログは特別な形式のウインドウで、ユーザーに対し質問をするのに都合よくデザインされています。それにはダイアログを開き、質問文を指定し、このダイアログを呼びだしたスクリプトに答えを戻すための、特別で単純なシンタックスが含まれています。また、ウインドウのタイトル、ウインドウに表示されるアイコンを指定することもデシます。フォント、オブジェクトの位置、ボタンの順番やアイコン、等はオペレーティング・システムに依存し、自動的に変化します。とは言え、このダイアログに準備された機能以上の機能が必要な場合には、(上で述べた)このダイアログにかわるモーダル・ダイアログ・ボックスを独自に作成することになります。


Figure 20 – Ask Question Dialog Boxes on Multiple Platforms

図20 ー 各プラットフォームにおけるアスク・クエスチョン・ダイアログ


all_img_51


To display the ask dialog, use the following commands:

アスク・ダイアログを表示するには、次のコマンドを使います。

ask “What is your name?”
ask question “What is the answer?” titled “Question”



Tip: You can try this example out right now by copying and pasting it into Tools -> Message Box, then pressing return.

秘訣:上のコマンドをコピーして、で開いたメッセージ・ボックスにペーストし、リターン・キーを押して、この見本を直ぐに試すことができます。


The word question specifies the icon, and may be any of question | information | error warning.

question
と言う言葉はアイコンを指定します。またquestion以外にinformation、error warningなどが使え、それに伴ってアイコンも変化します。

To change the miniature application icon shown in the Mac OS X platform picture above, see the entry for
gREVAppIcon in the Transcript Dictionary.

上図でマックOSXで表示されるミニチュアのアプリケーション・アイコンを変えるには、トランスクリプト辞書のgREVAppIcon項目をご覧下さい。

The result is returned in the
special variable it.

結果は特別な変数である it に返されます。

if it is “Joe” then doSomeThing

For complete details on the syntax, see the
ask command in the Transcript Dictionary.

こうしたシンタックスに関する完全で詳細な記述は、トランスクリプト辞書のaskコマンドをご覧下さい。



Figure 21 – Icons for Ask and Answer Dialogs on Multiple Platforms

図21 ー 各プラットフォームにおけるアスクとアンサー・ダイアログのアイコン


all_img_53