Jump to content
Macro Express Forums

Multiple Choice Modify Variable


Recommended Posts

Hello all!

 

I want to add/append a "TAB" ASCII character to every multiple choice item chosen so that when looking at it in the debug screen there will be tab spaces between each item chosen. I set the multiple choice to choose more than 1 item, but I haven't figured out a way to append a TAB after every item chosen in "SHOW VARIABLE VALUE" debug screen.

 

In other words, I would like to see spaces between the multiple items in the debug screen.

 

 

<VARIABLE SET TO ASCII CHAR Value="9" Destination="%T[99]%"/>
<VARIABLE SET STRING Option="\x00" Destination="%T[1]%"/>
<VARIABLE SET STRING Option="\x00" Destination="%T[2]%" Value="%T[1]%%T[99]%"/>
<MULTIPLE CHOICE MENU Style="\x01" Result="\x01" Dest="%T[2]%" Title="Grocery Categories" Prompt="Choose from Grocery Categories" Options="Dairy/Juice\r\nMeat/Fish/Chicken\r\nPasta/Bread/Grains\r\nFruits\r\nVegetables\r\nCheeses\r\nHousehold Items\r\nVitamins\r\nCat\r\nPersonal Care" Left="Right" Top="Bottom" Monitor="0" Width="265" Height="275" OnTop="FALSE"/>

 

Any help would be greatly appreciated!

 

Pat

Link to comment
Share on other sites

At first I modified your macro to include a tab after each menu choice:

Variable Set to ASCII Char 9 to %T[99]%
Multiple Choice Menu: Grocery Categories

<VARIABLE SET TO ASCII CHAR Value="9" Destination="%T[99]%"/>
<MULTIPLE CHOICE MENU Style="\x01" Result="\x01" Dest="%T[2]%" Title="Grocery Categories" Prompt="Choose from Grocery Categories" Options="Dairy/Juice%T[99]%\r\nMeat/Fish/Chicken%T[99]%\r\nPasta/Bread/Grains%T[99]%\r\nFruits%T[99]%\r\nVegetables%T[99]%\r\nCheeses%T[99]%\r\nHousehold Items%T[99]%\r\nVitamins%T[99]%\r\nCat%T[99]%\r\nPersonal Care%T[99]%" Left="Right" Top="Bottom" Monitor="0" Width="265" Height="275" OnTop="FALSE"/>

But that had the undesired effect of pre-checking all of the check boxes in the Multiple Choice Menu.

 

Then I tried using another non-displayable ASCII char:

Variable Set to ASCII Char 1 to %T[99]%
Multiple Choice Menu: Grocery Categories

<VARIABLE SET TO ASCII CHAR Value="1" Destination="%T[99]%"/>
<MULTIPLE CHOICE MENU Style="\x01" Result="\x01" Dest="%T[2]%" Title="Grocery Categories" Prompt="Choose from Grocery Categories" Options="Dairy/Juice%T[99]%\r\nMeat/Fish/Chicken%T[99]%\r\nPasta/Bread/Grains%T[99]%\r\nFruits%T[99]%\r\nVegetables%T[99]%\r\nCheeses%T[99]%\r\nHousehold Items%T[99]%\r\nVitamins%T[99]%\r\nCat%T[99]%\r\nPersonal Care%T[99]%" Left="Right" Top="Bottom" Monitor="0" Width="265" Height="275" OnTop="FALSE"/>

That method shows the spaces between variables.

 

If, later in your macro, you need Tabs between the choices you can use the Variable Modify String: Replace command, like this:

Variable Set to ASCII Char 1 to %T[99]%
Variable Set to ASCII Char 9 to %TAB%
Multiple Choice Menu: Grocery Categories
Variable Modify String: Replace "%T[99]%" in %T[2]% with "%TAB%"

<VARIABLE SET TO ASCII CHAR Value="1" Destination="%T[99]%"/>
<VARIABLE SET TO ASCII CHAR Value="9" Destination="%TAB%"/>
<MULTIPLE CHOICE MENU Style="\x01" Result="\x01" Dest="%T[2]%" Title="Grocery Categories" Prompt="Choose from Grocery Categories" Options="Dairy/Juice%T[99]%\r\nMeat/Fish/Chicken%T[99]%\r\nPasta/Bread/Grains%T[99]%\r\nFruits%T[99]%\r\nVegetables%T[99]%\r\nCheeses%T[99]%\r\nHousehold Items%T[99]%\r\nVitamins%T[99]%\r\nCat%T[99]%\r\nPersonal Care%T[99]%" Left="Right" Top="Bottom" Monitor="0" Width="265" Height="275" OnTop="FALSE"/>
<VARIABLE MODIFY STRING Option="\x0F" Destination="%T[2]%" ToReplace="%T[99]%" ReplaceWith="%TAB%" All="TRUE" IgnoreCase="FALSE"/>

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...
 Share

×
×
  • Create New...