Re: Dialog Director - Quit action
Re: Dialog Director - Quit action
- Subject: Re: Dialog Director - Quit action
- From: Kai Edwards <email@hidden>
- Date: Sun, 27 Oct 2002 15:11:11 +0000
on Sat, 26 Oct 2002 10:00:46 +1000, Duncan Cowan
<email@hidden> wrote:
>
Reading the dictionary, I noticed that the "push button" class has an
>
"action" property that is triggered when the button is pressed.
The documentation (v0.7) also has this to say: "Added action property to
push button class. An action may be a dialog record or a script handler
[experimental]."
I've not really tried to use the "action" property, and that last word would
make me a little jumpy about doing so - in a script that I had to rely on,
anyway.
(snip)
>
Has anyone who uses DD have any ideas on what I'm doing incorrectly?
>
I've managed to solve the problem of quitting the script in another way so
>
it's merely a point of interest now anyway.
FWIW, I normally use the record returned by the dd dialog to generate
conditional actions - something like this simple example:
------------------------------------------------------
set {beepBtn, cancelBtn} to (dd auto dialog [NO BREAK]
{size:{362, 112}, style:movable dialog, contents:{[NO BREAK]
{class:push button, bounds:{295, 83, 353, 103}, name:"OK"}, [NO BREAK]
{class:push button, bounds:{225, 83, 283, 103}, name:"Cancel"}, [NO BREAK]
{class:icon, bounds:{17, 9, 49, 41}, contents:1}, [NO BREAK]
{class:static text, bounds:{67, 9, 352, 41}, contents:[NO BREAK]
"Shall I beep now?"}}} with grayscale)'s {item 1, item 2}
if beepBtn then beep -- or do any other stuff
quit -- assuming it's a stay-open and you're now done
------------------------------------------------------
Kai
--
email@hidden
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.