Posted By
|
Message
|
]Alpha[
Registered 19/09/2003
Points 245
|
10th September, 2009 at 10:30:16 -
Hi guys, I have this problem.
How can I tell the program to save a value in a group named like a paragraph in a string object created for that porpouse?
I need to Set group to (text of a paragraph of a string object) but when I try with that command, it ask me to put in a value but I don't understand what it means.
I tried put random values in it but it just says "syntax error" so I don't really know what to do
If this isn't clear, I'll try to explain it in details...
I have an INI file with 10 groups, named...
[GROUP1]
[GROUP2]
[GROUP3]
[GROUP4]
ecc...
There are different items in these groups but each group has one item in common... let's call it "Status".
[GROUP1]
Status=0
[GROUP2]
Status=0
[GROUP3]
Status=0
[GROUP4]
Status=0
ecc....
I also have one string object with 10 paragraphs.
The text in each paragraph is just the name of the groups in my INI file.
String Object
Paragraph1 = Group1
Paragraph2 = Group2
Paragraph3 = Group3
Paragraph4 = Group4
ecc....
Now my problem is...
I need to save a value in the "status" item of one group.
The string object is always displaying the name of the active group.
So, if "Group1" paragraph is displayed, I need to save the value in group [Group1] item "status".
If "Group2" paragraph is displayed, I need to save the value in group [Group2] item "status".
So, to make long story short, when I save the value I need to do :
Set group to (text of a paragraph of the string object)
Set item to "status"
Set value to 5 <--- random number, who cares?
The problem is that I don't know how to set the group that way.
I know there is a funcion in the expression editor that retrieve the text of a paragraph of a string object, but I tryed for a whole hour without understand which values to use.
Hope someone can help me.
Thank you in advance!!
All that I see is the years...
|
Spitznagl Cabinetmaker
Registered 06/12/2008
Points 4260
|
10th September, 2009 at 11:24:24 -
Set value to
[Group]: paragraph$( "String", 1) ........ where 1 is the paragraph (starting at 0)
[Item]: ...
...
|
]Alpha[
Registered 19/09/2003
Points 245
|
10th September, 2009 at 14:24:57 -
It works!!!
Thank you very much Spitz!
All that I see is the years...
|
|
|