shaidyn Posted January 31, 2017 Report Share Posted January 31, 2017 Hi there, folks, I'm making a little macro to launch various versions of an application I have. I'd like to set the default choice of the multiple choice menu to B. I've read the help file and the FAQ and the forum post, and they all say the same thing: Variable set string %T[1]% to B and you're golden. The problem is, I've done that (or at least I think I have) and it's not working. Here's my macro: <VARIABLE SET STRING Option="\x00" Destination="%T[1]%" Value="B" NoEmbeddedVars="FALSE"/><MULTIPLE CHOICE MENU Style="\x00" Result="\x00" Dest="%version%" Title="Policy Manager Launcher" Prompt="Which version of CA Policy Manager would you like to launch?" Options="9.1\r\n9.2\r\n9.3" Left="Center" Top="Center" Monitor="0" Width="443" Height="296" OnTop="TRUE" Columns="Auto"/><SWITCH Variable="%version%"/><CASE Value="B"/><ACTIVATE OR LAUNCH Title="CA API Gateway - Policy Manager 9.2.00" Exact_Match="FALSE" Wildcards="FALSE" Path="C:\\Program Files (x86)\\CA Technologies\\CA API Gateway Policy Manager 9.2.00.6809\\CA API Gateway Policy Manager.exe" Mode="\x00" Default_Path="TRUE" Wait="1" Wait_For_Program="12"/><END CASE/><END SWITCH/> If I've missed something simple, which I hope, please let me know. If not, I'd love some help getting the multiple choice menu to have the second option, 9.2, pre-selected. Thanks Quote Link to comment Share on other sites More sharing options...
Cory Posted January 31, 2017 Report Share Posted January 31, 2017 You are not using variable T1. Set %version% to "B" in your first line. Quote Link to comment Share on other sites More sharing options...
shaidyn Posted January 31, 2017 Author Report Share Posted January 31, 2017 Much obliged. I suppose I thought the %version% variable didn't exist until line two, so I couldn't reference it in line one. Thanks for the pointer. It works smoothly now. Quote Link to comment Share on other sites More sharing options...
Cory Posted February 1, 2017 Report Share Posted February 1, 2017 In MEP the variables are declared separately. Look at the variables tab. It's not like modern programming languages where you can declare (dimension) them in the code. Sometimes conditionally. All variables are initiated as soon as the macro starts. 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.