Jump to content
Sign in to follow this  
hirntot

_StringRepeat but in next Line

Recommended Posts

hirntot

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
buzz44

#include <String.au3>

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


qq

Share this post


Link to post
Share on other sites
hirntot

#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
buzz44

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


qq

Share this post


Link to post
Share on other sites
hirntot

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  

×