Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   How to use Read_INI to enumerate all values in an empty section? (https://www.kinook.com/Forum/showthread.php?t=4062)

lviolette 06-23-2009 03:45 PM

How to use Read_INI to enumerate all values in an empty section?
 
Suppose the following INI section
[Build Platforms]
; Debug=True
; Release=False

All values in Build Platforms are commented out.

I expected the "Read INI" Action to return an empty string, or an empty array.

Instead it Fails with "The parameter is incorrect".

It works fine if at least one item exists in the section, but not if no items exist in the section.

I'm wanting to enumerate all the items in a section without requiring that section to contain an item (return empty string if section contains no items).

Right now, only way I can think of to do it is to write custom script code for my Read INI step and if the step fails, reset it to Success and manually set the return Macro value to an empty string.

Is there an easier way?

kinook 06-23-2009 07:44 PM

That is a bug, which will be fixed in the next release.

For now, what you can do is first initialize the target macro to an empty string using a Set Macro step and mark the Read INI step to continue on failure (More tab).


All times are GMT -5. The time now is 12:09 PM.


Copyright © 1999-2023 Kinook Software, Inc.