Populating Multiple Choice Menu From Text File
#1
Posted 01 March 2007 - 12:16 PM
I've only done fairly simple macros with Macro Express so far, so forgive me if this is easier than I realize. Is there a way to populate the Multiple Choice Menu from a text file? I'm in an environment where several people use the same macro on different computers and would like the text file to live on a shared drive. It will need regular updating, and I don't want to have to go to every computer to make the changes.
Thanks,
Mark Sandford
#2
Posted 01 March 2007 - 01:07 PM
ASCII File Begin Process: "Multiple Choice.csv" (Comma Delimited Text ) ASCII File End Process Multiple Choice Menu: Test
#3
Posted 01 March 2007 - 06:16 PM
Tom
Dick
Harry
Now read that text file into a text variable like T1. Now in the multiple choice menu simply write %T1% on the first line. I know it seem odd but your multiple choice menu will now display all three choices! This way you only need one text variable.
In some macros I write I manipulate files or search for text. Each time I find a hit I can simply append an accumulator variable. You just need to add a CRLF (carriage return/line feed) to the end and now it's easy to display to your user for choice!
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
#4
Posted 01 March 2007 - 07:37 PM
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
#7
Posted 06 March 2007 - 07:47 AM
Tom
Dick
Harry
etc.
Into [Text Type] and choose [Use Clipboard to Paste Text].
Then open [Variable Set String] and choose [Set Value from Clipboard] and [Choose Variable Name] T1.
Last [Clipboard Empty].
Then the following as Cory discribed:
"Now read that text file into a text variable like T1. Now in the multiple choice menu simply write %T1% on the first line. I know it seem odd but your multiple choice menu will now display all three choices! This way you only need one text variable."
Still the problem is that you only could use 37 alternatives in the Menu list in Multiple Choice Menu. The possibility for more alternatives then 37 is something i wish for. Does anyone know if this has been brought up before?
#8
Posted 06 March 2007 - 10:15 AM
Another consideration is that as the number of items increases it takes the user longer to read through them to know what to pick. Our suggestion has been to create categories and when you click on an item it may bring up another Multiple Choice Menu.
#9
Posted 06 March 2007 - 10:17 AM
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
#10
Posted 06 March 2007 - 10:25 AM
Quote
There are three places where tips and techniques are shared:
- This discussion forum
- The Shared Macros web page
- The Macro Express News email newsletter and archives
#11
Posted 06 March 2007 - 10:27 AM
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
#13
Posted 09 March 2007 - 05:30 AM
I create a text file
in it, I can list any amount of lines I wish (100+)
I have a macro that then opens this text file, and resizes it to about 100 x 200.
User can scroll down through text file, to item he desires
then, user clicks anywhere ON that item (beginning, end, middle, etc)
Right-clicking the mouse activates the next step of macro; it does
HOME (beginning of line)
Shift-END (goes to END of line)
COPY to clipboard
store in variable
you now have your selected item stored in a variable, able to place where you desire.
I don't have this macro clean enough to post, but it works pretty well to allow bypassing of the 36-entry limit of the multiple choice boxes.
#14
Posted 25 June 2007 - 10:00 PM
#15
Posted 04 October 2007 - 10:13 AM
I tried blopib's example of putting text in clipboard into a Variable and then using the variable in a multiple choice menu and it worked.
However, for the life of me, I can't get the process text/ascii file to do the same thing. It is not recognizing the line breaks and anything after the first record simply disappears.
I have been trying both process text file and ASCII file. I have tried comma and tab delimited, using a file exported from Excel and a text file created with notepad. Again, just copying the contents of these files into the clipboard and using the first example in this post worked. Processing the file automatically doesn't.
Please clue me in! :-) Thanks!

Sign In
Register
Help
MultiQuote

