MessageBox in VisualNEO Web: which variable contains the user's response? - Forum

Forum Navigation
You need to log in to create posts and topics.

MessageBox in VisualNEO Web: which variable contains the user's response?

Hello!
I do not understand where 1 is located if the user presses the first button in the MessageBox window.
No examples of working with the subroutine. What should be in the subroutine?

How to do in VisualNEO Web that in VisualNEO Win looks like this:

MessageBox "Hello" "How do you feel?" "Good|Fair|Poor" "[Mood]"
If "[Mood]" "=" "1"
  AlertBox "Hello" "That’s wonderful!"
EndIf
If "[Mood]" "=" "2"
  AlertBox "Hello" "I hope your mood improves."
EndIf
If "[Mood]" "=" "3"
  AlertBox "Hello" "That’s too bad."
EndIf
If "[Mood]" "=" "0"
  AlertBox "Hello" "Wow, you must really be in a bad mood!"
EndIf

 

Hi @vadim,

MessageBox display a themed dialog message box with a custom message and buttons. To determine which button was clicked, create a Subroutine with a single integer parameter. This parameter will contain the number of the selected button (1 for first, 2 for second... or zero for none).

Please take a look at the attached sample.
Best regards,

Uploaded files:
  • You need to login to have access to uploads.
Vadim has reacted to this post.
Vadim

Thank you very much, Luis!
I did not understand the phrase:

Subroutine with a single integer parameter

In the debugger, I could not find the variable in which the user's choice is stored.
The help also does not have this information.


Your example helped!
It turns out the variable for user response must be specified on the tab "Parameters" and indicate its type. Now I understand.


I think that the help should add an example of the design of the subroutine (maybe a screenshot, which shows where the subroutine parameter is created). And a link to the project demo file.

Thank you!