Re: cancel dialog button doesn't quit Filemaker pro
Re: cancel dialog button doesn't quit Filemaker pro
- Subject: Re: cancel dialog button doesn't quit Filemaker pro
- From: Harold Bert Martin <email@hidden>
- Date: Wed, 19 Dec 2001 12:19:03 -0700
If you have your dialog in a subroutine, it will only stop the subroutine,
not the whole script. In your dialogs, it looks like you're just using the
defaults. Try removing these parts from your code:"default button 1
buttons {"okay","cancel "}"
--
Thanks,
H. Martin
email@hidden
>
Message: 3
>
Date: Tue, 18 Dec 2001 17:18:15 -0800
>
From: Janis Rough <email@hidden>
>
To: "'AppleScript-Users'" <email@hidden>
>
Subject: cancel dialog button doesn't quit Filemaker pro
>
>
I have the first script working within filemaker pro except for some
>
reason when you click cancel it still proceeds through the rest of the
>
script and creates a P.O. I assume you have to capture the result of
>
the user choice and insert another if then clause in the Else statement,
>
>
but I wonder why? I thought if you hit the "cancel" button it cancels
>
the script or does it just cancel the dialog?
>
If (isempty(field))
>
perform applescript:
>
Try
>
set v to cell "g_vendor_id" of current record
>
set the user_choice to the button returned of the result
>
{display dialog "Do you wish to create a Lettershop P.O. for
>
Vendor ID#"&
>
" "& v&"?" default button 1 buttons {"okay","cancel "} with
>
icon 2}
>
end try
>
exit script
>
else
>
perform applescript:
>
Try
>
set v to cell "g_lettershop_id" of current record
>
set the user_choice to the button returned of the result
>
{display dialog "Do you wish to create a Lettershop P.O. for
>
Vendor ID#"&
>
" "& v&"?" default button 1 buttons {"okay","cancel "} with>
>
>
icon 2}
>
end try
>
perform external subscript
>
end if
>
----------------------
>
something like this?
>
>
if the user_result is "cancel"
>
tell application "Filemaker Pro"
>
exit script
>
end tell
>
end try
>
>
>
thanks,
>
Jansi