AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Improved IniWrite (write spaces)

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Kerry



Joined: 20 Jul 2006
Posts: 146
Location: Los Angeles

PostPosted: Tue Sep 12, 2006 9:27 pm    Post subject: Improved IniWrite (write spaces) Reply with quote

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
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Peter



Joined: 30 Dec 2005
Posts: 279

PostPosted: Wed Sep 13, 2006 11:16 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group