Poco Script FAQ - Drop down boxes

Poco Script FAQ - Drop down boxes

Q: I would like to have choices available in a script. For example - in the "Filter Message" script, where the section is for "What word should I look for", I would like to hard code multiple words in the script so I can select from a list on the pulldown menu. Have looked thru other scripts and searched thru the forums but cannot find an answer yet.
 
A: The "Filter Message" script uses the External command to get input values via the Setup option in the scripts window. Unfortunately there is no provision for user defined lists using this command although I have suggested a possible format to Slaven for this.

To prompt for input values while the script is running rather than from the "Setup" you would use the following format:

InputBox $answer $question $choices Where $choices is a list of possible choices with each choice separated by a vertical bar. Eg: "Yes|No|Maybe" For the "Filter Message" script modification you want I suggest using a combination of an input file that you edit in the Setup portion of the script to store the possible choices and an input box command to retrieve the values. You could code a loop to build the $choices variable. This would be the most flexible if you wanted to send a modification of the script so others could use it.