H2o-KiD Posted August 30, 2006 Report Share Posted August 30, 2006 Here is a question. How can I make that, Macro A is the macro that shows questions and you must choose [Multiple Choice Menu]. All the answers that you chosen will be sent to Macro B. Macro A and B is different. --> Macro A chosen's choice send to Macro B and you can work things that you chosen by activating the Macro B. So far, i can only make in 1 Macro. Not 2 macros. Quote Link to comment Share on other sites More sharing options...
kevin Posted August 30, 2006 Report Share Posted August 30, 2006 The answer or answers to a Multiple Choice Menu are saved in one or more variables. Normally when a macro is activated all the variables are cleared before the macro runs. The only exception to this is when one macro calls another using the Macro Run command. So one option is to call Macro B from within Macro A using the Macro Run command. If this will not work for you then you need to save the variable or variables set by the selection in Macro A and then load them within Macro B. There are several commands that can be used to save and restore variables. // Save / restore all text variables (%Tx%) Variable Save Text Variables Variable Restore Text Variables // Save / restore all variables Variable Save All Variables Variable Restore All Variables // Save / restore a single variable using an .INI file Variable Modify String: Save %T1% to INI File Variable Set String %T1% from INI File // Save / restore a single variable using the environment variables Variable Modify String: Save %T1% to Environment Variable Variable Set String %T1% from Environment Variable // Save / restore a single variable using a text file Variable Modify String: Save %T1% to Text File Variable Set String %T1% from File: "T1" Quote Link to comment Share on other sites More sharing options...
H2o-KiD Posted August 31, 2006 Author Report Share Posted August 31, 2006 Can you give some example? I still don't know how to use those commands. Thank you Quote Link to comment Share on other sites More sharing options...
kevin Posted August 31, 2006 Report Share Posted August 31, 2006 You can see examples is by looking at the 'samples.mex' macro file. This is installed in the folder where the Macro Express program files are installed. Normally this is c:\Program Files\Macro Express3. To load this file click File, Open Macro File and navigate to the correct folder. The 'Popup Menu of Sample Macros' demonstrates the use of the Multiple Choice Menu command. To learn about variables, including how to save and restore variables, read the Macro Express help. It is available online at http://www.macros.com/help/macexp3.htm or within Macro Express itself by clicking Help, Macro Express help. I recommend the help topic titled 'Variables Overview'. Once you read that page you can click the 'Next' button near the top of the help window and it will bring up additional help topics that discuss how variables work. Quote Link to comment Share on other sites More sharing options...
H2o-KiD Posted August 31, 2006 Author Report Share Posted August 31, 2006 I did as the following below and ends up, i chosen Man, it gives me the Correct answer and the wrong answer aswell. How do i make like, if i choose Man, only shows correct anwswer in Macro B and if i choose the wrong answer, it shows only Wrong asnwer in Macro B and not both come out after one another. Macro A Variable Modify String: Save %T1% to Environment Variable [Man] Variable Modify String: Save %T1% to Environment Variable [Women] Multiple Choice Menu [A: Man, B: Women] Macro B Variable Set String %T1% "Man" Variable Set String %T1% "Women" If Variable %T1% = "Man" Text box display: Correct End If If Variable %T1% = "Women" Text box display: Wrong End If Quote Link to comment Share on other sites More sharing options...
cyberchief Posted August 31, 2006 Report Share Posted August 31, 2006 When you set %T1% to equal "Man"... then set %T1% to equal "Women"... T1 will now only equal "Women". Not quite sure what you are trying to do here... Try this: Macro A Multiple Choice Menu: Choose Variable Modify String: Save %T1% to Environment Variable (type) Macro Run: Macro B Macro B Variable Set String %T1% from Environment Variable (type) If Variable %T1% = "Man" Text box display: Correct Else If Variable %T1% = "Women" Text box display: Wrong End If End If Quote Link to comment Share on other sites More sharing options...
H2o-KiD Posted August 31, 2006 Author Report Share Posted August 31, 2006 Theres another bug. I did the right thing, and it ends up bugging. Example : Macro A, i chosen the answers. Then, I activate the Macro B to launch. It will work at the first time. Then i choose again in Macro A, but in another answers, then i activate it in Macro B, it still got the previous answers's command working. How do i cancel the previous after i have chosen the new one? 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.