ReadIni - Is is possible to use a variable for section name?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
matthadley
Newbie
Posts: 2
Joined: Sun Jul 24, 2005 3:47 am
Location: Richmond, VA

ReadIni - Is is possible to use a variable for section name?

Post by matthadley » Thu Aug 04, 2005 7:39 pm

For now, I would like to store certain parameters in an INI file, by section. To do so, I must be able to reference the section name as a variable. Is this possible? I am using the latest version of Macro Scheduler Pro.

Example:

compiledscript.exe /Pub=CVO

Line in compiledsript.exe:

ReadIniFile>.\AutoWebDump.ini,%Pub%,FileName,FileName

AutoWebDump.ini
[General]
...

[CVO]
FileName=CVO2Web2.txt
...

[CUO]
FileName=CUO2Web3.txt
...

Thanks,
Matt

matthadley
Newbie
Posts: 2
Joined: Sun Jul 24, 2005 3:47 am
Location: Richmond, VA

It is.

Post by matthadley » Thu Aug 04, 2005 8:53 pm

It helps if I can type correctly in the ini file. The sample above is correct, but a transposition of characters led to my confusion and thus the posting.

It works just fine with a variable.

Matt

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts