WDTextboxAppendToFile and line feed

Moderator: Moderator Group

WDTextboxAppendToFile and line feed

Postby baur » Tue Oct 03, 2017 4:19 pm

Hi,
i would like to send my textbox info to my fichier.txt but i can't have a line feed.
How to make that ?
thank .
baur
 
Posts: 1
Joined: Sat Jun 11, 2011 9:37 am

Re: WDTextboxAppendToFile and line feed

Postby Justyn Roy » Tue Oct 03, 2017 9:51 pm

Hi Baur,

I was working on a project that required the same thing today.


It does make a new line, it just doesn't show up in Windows Notepad.

If you open it with Windows Wordpad it works a little better, but is still not perfect with this script.
If you use a different script, it will work a little better though:

Get the information from the TextBox into a Variable:
Create a String Variable called "Textbox"

Code: Select all
VGetTextboxText,Textbox,1


Now send this to the file with the following code:

Code: Select all
WDVariableAppendLineToFile,Textbox,PATH TO TEXT FILE.txt


I was able to read this with new lines in Word Pad, but not Note Pad.

Also, your original script will work with Notepad ++ for reference - a free tool that has a lot of additional options compared to the default Windows tools.


Regards,

Justyn
User avatar
Justyn Roy
 
Posts: 40
Joined: Tue Sep 27, 2016 1:26 am

Re: WDTextboxAppendToFile and line feed

Postby Benni_M » Wed Oct 04, 2017 2:55 pm

Hey,

Exatly like Justyn wrote but you have to add a label for a new line.

Create Label 1

Code: Select all
label1.text = \n
Textbox = textbox1.text
VAdd,Textbox,Textbox,lable1.text
WDVariableAppendLineToFile,Textbox,PATH.txt


this should work.

Best regards,
Benni
Benni_M
 
Posts: 96
Joined: Thu Apr 12, 2012 3:45 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 1 guest