Jump to content
Macro Express Forums

Multiple Choice Menu with a compulsory value


Recommended Posts

Hi All,

 

Wish you all a very Happy New Year :)

 

Does anyone knows a way how to get a value from user in a MCM(Multiple Choice Menu) box. Till the time user doesn't select a value from the menu, the MCM box doesn't disappears.

 

I've tried it for a input box and its working fine. But i'm not sure how to do it for a MCM box.

 

Any Suggestions ?

 

Gagan

Link to comment
Share on other sites

  • 2 weeks later...

Open the macro file samples.mex. This macro file is installed when you install Macro Express Pro. It should be located in your "My Documents\Insight Software" folder. Look at the sample macros "Menu and Question" and "Multiple Choice Menu with Default". The first shows how to require a compulsory value. The second demonstrates the various options using Multiple Choice Menus.

Link to comment
Share on other sites

Thanks for the replying Samrae.

 

I checked both the macro's mentioned above but couldn't get a menu with compulsory value. I was able to cancel the MCM without a value and even click the OK button w/t any value.

 

Mentioned below is the script which i piced from this macro.

 

// Multiple Choice Menu example
Multiple Choice Menu: Windows Type
If Variable %T[1]% Contains "A"
Variable Set String %T[3]% to "2000"
End If
If Variable %T[1]% Contains "B"
Variable Set String %T[3]% to "XP"
End If
If Variable %T[1]% Contains "C"
Variable Set String %T[3]% to "Server 2003"
End If
If Variable %T[1]% Contains "D"
Variable Set String %T[3]% to "Vista"
End If
If Variable %T[1]% Contains "E"
Variable Set String %T[3]% to "Server 2008"
End If
If Variable %T[1]% Contains "F"
Variable Set String %T[3]% to "7"
End If
If Variable %T[1]% Contains "G"
Variable Set String %T[3]% to "Server 2012"
End If
If Variable %T[1]% Contains "H"
Variable Set String %T[3]% to "8"
End If
If Variable %T[1]% Contains "I"
Variable Set String %T[3]% to "Server 2012 R2"
End If
If Variable %T[1]% Contains "J"
Variable Set String %T[3]% to "8.1"
End If
Text Box Display: Windows Type

// --------------------------------------------------------
// Done
// --------------------------------------------------------
Text Box Display: Sample Macro: %MacroName%
Unlock Keyboard and Mouse

Link to comment
Share on other sites

I can't understand your OP, can you reiterate? Is your question how to pre-select a value in a multiple choice dialog box? IE when the user prompted an item is already selected? I do this with all my multiple choice menus. A few even keep a tally of which are selected most frequently or the last selection and preselects that for the user.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...