Sign in to follow this  
Followers 0
hirntot

_StringRepeat but in next Line

5 posts in this topic

I try to write something into a File. I want it to write the text more than once but everytime into the next line.

But it doesn't work ...

Can somebody help me?

$write = FileWrite ("C:\WINDOWS\Temp\text.txt", "text" & @CRLF)
$repeat = _StringRepeat($write,4)

Share this post


Link to post
Share on other sites



#include <String.au3>

$Text = "Text" & @CRLF
$Write = FileWrite ("C:\WINDOWS\Temp\text.txt", _StringRepeat($Text, 4))


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

#include <String.au3>

$Text = "Text" & @CRLF
$Write = FileWrite ("C:\WINDOWS\Temp\text.txt", _StringRepeat($Text, 4))
THX it works but i forgot to write that the text should be read trough a input box.

$input2 = GUICtrlCreateInput ("Text",90,20,120,20)
$text = (($input2) & @CRLF)

I've tried it like this but it just writes the number "3" into my file.

But i also have a input with numbers that works correctly. So i wondered why it not works the same way ...

Share this post


Link to post
Share on other sites

$Input2 = GUICtrlCreateInput ("Text", 90, 20, 120, 20)
$Text = GUICtrlRead($Input2) & @CRLF


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Works perfectly, thx mate ... ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0