A modern dialog window instead of the standard box.”

I have tried many times to create a Windows card instead of the standard dialog box, as I want it to look more professional. Unfortunately, it’s still not working.

Set Error Capture [ On ]
Allow User Abort [ Off ]

New Window [ Style: Card ; Name: "Confirm_Exit" ; Using layout: “UI_Exit_Application” ; Height: 200 ; Width: 400 ; Top: Center ; Left: Center ]

Pause Script [ Indefinitely ]

If [ $$Choice_Exit = "Exit" ]
Close Window [ Name: "Confirm_Exit" ]
Exit Application
Else If [ $$Choice_Exit = "Cancel" ]
Close Window [ Name: "Confirm_Exit" ]
Exit Script [ Text Result: "Cancelled" ]
End If

note: the a script will be onlastwindowsclose.

Not sure what you are having as an issue. ??

A card window is auto-sizing, auto-entering, modal to the parent window launched from. That last tidbit may be where the issue lies; the card cannot exist if the parent window is not open. Also the pause script indefinitely has nothing (in your post) to indicate a resume script.

Hi, @Saeed , if I understand your request, here's a very simple example file that does what I think you want. The issue is you need two scripts, not one with "pause indefinitely". Plus a $$trigger to help direct things.

The scripts are bare-bones, but you can extend as needed. Upon closing you could do some logging data first or whatever. The "No" button uses a single step script, but you could take the user to their dashboard or whatever, etc. I hope it's of some help to you.

CardDialogOnLastWindowClose.fmp12 (220 KB)

1 Like