Kerry
Joined: 20 Jul 2006 Posts: 146 Location: Los Angeles
|
Posted: Tue Sep 12, 2006 9:27 pm Post subject: Improved IniWrite (write spaces) |
|
|
is there an easy way to get IniWrite to set the value as a certain amount of spaces? Right now, it adds spaces for each value in a string, but doesn't set it to that, so if you call it three times to set it to " ", then it will be " ".
-Kerry _________________ String Manipulator - GrabIco |
|
Peter
Joined: 30 Dec 2005 Posts: 279
|
Posted: Wed Sep 13, 2006 11:16 am Post subject: |
|
|
Yes IniRead trims the "free" spaces, so you have to use a workaround e.g. | Code: | Var:= ". ." ; enclose spaces with character e.g. "."
IniWrite, %Var%, test.ini, Test, Space1
; or use:
IniWrite, 3, test.ini, Test, Space2 ; writes amount of spaces
IniRead, SpaceVar1, test.ini, Test, Space1 ; -> ". ."
IniRead, SpaceCount, test.ini, Test, Space2
SpaceVar2=
Loop, %SpaceCount%
SpaceVar2:= SpaceVar2 A_space ; ->3 spaces |
|
|