ocillmusic Posted July 21, 2005 Report Share Posted July 21, 2005 I have a Multiple choice pause with 3 choices. How do I set up each one of those choices to open a certain folder based on which choice is selected. Choices: a) blue ----> open folder named blue red -----> open folder named red c) green -----> open folder named green Quote Link to comment Share on other sites More sharing options...
randallc Posted July 21, 2005 Report Share Posted July 21, 2005 Hi, There are a number of examples on the forum, and at the Macro Express3 site; and I suspect in "help" files. See multiple choice in my signature under "DOS"; there is a link; again here; DOS multi choice In the "case" commands, just insert your directory to open. Best, Randall <EXPLORE:c:\blue> Open Folder in Explorer: c:\blue Quote Link to comment Share on other sites More sharing options...
ocillmusic Posted July 25, 2005 Author Report Share Posted July 25, 2005 My problem is that I can assign an action to eash one but it doesn't just do the one that it chosen in the menu. It does all of them. Do I need to add and IF statement somewhere? Quote Link to comment Share on other sites More sharing options...
joe Posted July 25, 2005 Report Share Posted July 25, 2005 Hello ocillmusic! Please post the section of code that is giving you a problem. This makes it easier to determine what is wrong. Quote Link to comment Share on other sites More sharing options...
Cory Posted July 26, 2005 Report Share Posted July 26, 2005 If I understnad you correct it would look like this in the scripting editor: Multiple Choice Menu: Open a folder If Variable %T1% = "A" Open Folder: c:\blue End If If Variable %T1% = "B" Open Folder: c:\red End If If Variable %T1% = "C" Open Folder: c:\green End If To see what's really going on copy and paste this part into the scripting editor. <MENU2:2:T:01:CenterCenter:Open a folderBlue Red Green><IFVAR2:1:01:1:A><MYCOMP:c:\blue><ENDIF><IFVAR2:1:01:1:B><MYCOMP:c:\red><ENDIF><IFVAR2:1:01:1:C><MYCOMP:c:\green><ENDIF> Quote Link to comment Share on other sites More sharing options...
floyd Posted July 26, 2005 Report Share Posted July 26, 2005 It looks correct. Another option is to use the Switch/End Switch construct. Multiple Choice Menu: Open a folder Switch (T1) Case: A Open Folder: c:\blue End Case Case: B Open Folder: c:\red End Case Case: C Open Folder: c:\green End Case End Switch ---------- <MENU2:2:T:01:CenterCenter:Open a folderBlue Red Green><SWITCH:T1><CASE:A><MYCOMP:c:\blue><ENDCASE><CASE:B><MYCOMP:c:\red><ENDCASE><CASE:C><MYCOMP:c:\green><ENDCASE><ENDSWITCH> Quote Link to comment Share on other sites More sharing options...
Cory Posted July 26, 2005 Report Share Posted July 26, 2005 In cases like these I don’t see the benefit of the Case command. Unless you have multiple nested conditions it just adds two extra lines. Of course it’s possible I am ignorant to some other benefit to using case in which case I would love to be enlightened. Lord knows I have a lot to learn. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.