Drop Down List Box

Started by winuser2003, December 16, 2013, 09:34:23 AM

Previous topic - Next topic

winuser2003

All,

Thank you for taking the time to read my issue, and I hope I am posting in the correct area. I have a drop down list that displays a few items, and the line is as follows

ATGFILELIST= STRCAT("SmartSupplyATGWeeklyReport_2013_12_15.xls",@TAB,"SmartSupplyATGWeeklyReport_2013_12_22.xls",@TAB,"SmartSupplyATGWeeklyReport_2013_12_29.xls",@TAB,"SmartSupplyATGWeeklyReport_2014_01_05.xls",@TAB,"SmartSupplyATGWeeklyReport_2014_01_12.xls",@TAB,"SmartSupplyATGWeeklyReport_2014_01_19.xls",@TAB,"SmartSupplyATGWeeklyReport_2014_01_26.xls",@TAB,"SmartSupplyATGWeeklyReport_2014_02_02.xls",@TAB,"SmartSupplyATGWeeklyReport_2014_02_09.xls",@TAB,"SmartSupplyATGWeeklyReport_2014_02_16.xls",@TAB,"SmartSupplyATGWeeklyReport_2014_02_23.xls")


Now the items in the above line change from time to time. I would like to see if its possible to setup a variable where it just reads from maybe a txt file, but still lists the same items. Editing the script itself can be a lot of hassel, whereas if I use something as simple as a notepad the process is a little easier. I believe there is a way to do this, but cannot remember. I set a variable called "ATGFILELIST and its just calling the drop down menu data direct from the script. I would rather the source of this data be in a txt file if  possible. Thank you for your time.

JTaylor

Sure.   You will probably find FileGet() and StrReplace() useful functions.

Jim

Deana

Create a separate txt file that has each file name on its own line and place in the same directory as your script. Then in your script you can read the data and replace the carriage return line feeds with tabs, like this:

Code (winbatch) Select
filedata = FileGet( DirSCript(): 'xlsfiles.txt')
ATGFILELIST = StrReplace( filedata, @CRLF, @TAB )
Deana F.
Technical Support
Wilson WindowWare Inc.

winuser2003

As usual thats the perfect kind of assistance :) thank you. I apologize if I posted this in the wrong section however.