Jump to content

Custom Dialog - To close dialog is it necessary to Get ( LastMessageChoice )?


Alex117

This topic is 4005 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi, I had a simple question that had recently come up in my scripting.
 
When writing a script that contains a Custom Dialog with just the default "OK" button and no other buttons, is it necessary to use a Get ( LastMessageChoice ) script step right after to properly close the dialog and perform the next action? Or is it okay to just write the rest of the script steps that follow, right after the Custom Dialog step, without getting the last message choice? Since there really is only one button choice presented to the user and not multiple outcomes.
 
Thanks for any insight!
 
Bellow is a sample script with this scenario:

 

# Show custom dialog with only one button ("OK" button with "Commit Data" checked).
Show Custom Dialog [ Message: "Please click "OK"."; Default Button: “OK”, Commit: “Yes” ] 
#
# Perform the next script step (without getting the last message choice).
Go to Field [ ]
Link to comment
Share on other sites

The dialog box closes automatically when the user clicks one of the available buttons, you can't close it through a script step.

 

The get(lastmessagechoice) is there so you would know what button the user has clicked to close the dialog

Link to comment
Share on other sites

So in this particular case since there is only one button I don't really need to know which button was selected in order to continue with the rest of the script, right?

 

I've seen cases where there are two buttons and the use of Get ( LastMessageChoice ) becomes apparent. For example, a "YES" and a "NO" button. If the user clicks "yes" some specific script steps need to be performed, if they click "no" instead a different set of script steps are performed.

 

Since there is only one button in this case, and only one outcome, there is no need to use the Get ( LastMessageChoice ) step, correct?

Link to comment
Share on other sites

This topic is 4005 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.