mIRC Home    About    Download    Register    News    Help

Print Thread
#249627 07/12/14 09:05 PM
Joined: Dec 2014
Posts: 5
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Dec 2014
Posts: 5
Hello! Its me again. I have a new problem maybe someone can help me again !

Code:
writeini -n test.ini $read(test.txt) test $read(test2.txt,t)


In Test.txt
Code:
Bla Blu Blup


In Text2.txt
Code:
3


Its write the inifile
Code:
[bla]
blu=blub test 3


but i want
Code:
[bla blu blub]
test=3


So the Problem is Space between the Words if think.

if i try

Code:
set %test $read(test.txt)


i can see the text in the Variables as a whole

but

Code:
writeini -n test.ini %test test $read(test2.txt,t)


also not work

Yours sincerely,
Renegaade

Renegaade #249628 07/12/14 09:33 PM
Joined: Jul 2006
Posts: 4,180
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
This is due to the fact that command seperate argument by spaces, there are no way around that, INI files themselves can have section's name with space, but you can't create such sections with /writeini


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #249629 07/12/14 10:05 PM
Joined: Jan 2004
Posts: 1,360
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,360
Originally Posted By: Wims
This is due to the fact that command seperate argument by spaces, there are no way around that, INI files themselves can have section's name with space, but you can't create such sections with /writeini

/writeini test.ini "hello world" foo bar

Loki12583 #249631 07/12/14 10:56 PM
Joined: Jul 2006
Posts: 4,180
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
Wow, this is so undocumented, I thought only filenames/fonts had support for quotes, thanks!

Did you just find out by testing or you knew that? That's the first time I ever see this mentioned/used ever, I never tested this because it goes against everything.

Last edited by Wims; 07/12/14 10:59 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #249632 07/12/14 11:12 PM
Joined: Jan 2004
Posts: 1,360
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,360
I had the same reaction when I saw it, just some guy on IRC mentioned it.

Renegaade #249634 08/12/14 01:25 AM
Joined: Dec 2014
Posts: 5
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Dec 2014
Posts: 5
But this will not solve my problem or ?

"$read(test.txt)" will not work frown

but its no problem , then i will try in my Project whit an *.txt.

Please accept my best thanks!



Renegaade #249635 08/12/14 09:44 AM
Joined: Jul 2006
Posts: 4,180
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
Yes it will:

writeini -n test.ini $qt($read(test.txt)) test $read(test2.txt,t)

Note also that $read used that way return a random line from the file, it works here because you only seem to have one line in the file.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #249647 08/12/14 11:19 PM
Joined: Dec 2014
Posts: 5
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Dec 2014
Posts: 5
You are my Hero !

Thank you so much !

My Script is now complete and Working !

Now the next Project is starting !

Thanks to all


Link Copied to Clipboard