Page 1 of 1
write to file
Posted: 26 Aug 2013 12:52
by Julio Botelho
I understand that Write to File uses text file, not binary.
But if i want to insert any especial character? For exemple, a Carriage Return and Line Feed?
On script, there are some string function like substring?
Re: write to file
Posted: 26 Aug 2013 16:13
by Martin
Hi,
You can write some special characters (like \r\n\t\f) using an inline expression. For example:
this is a text{"\r\n"}
The part between curly braces is interpreted as a script and is replaced by the value of the last expression within the curly braces.
Regards,
Martin
Re: write to file
Posted: 26 Aug 2013 17:43
by Julio Botelho
Perfect.
I tried \r\n but wwithout braces
Thanls a lot.
And about substring?
Re: write to file
Posted: 28 Aug 2013 15:50
by Martin
Hi,
You can also write the contents of a variable to the file.
Assume you have a variable xyz that contains the string "test":
this is a {xyz} writes
this is a test
this is a {substring(xyz, 2)} writes
this is a st
The supported functions and some examples are available on the help page of action script or online:
Action Script
Regards,
Martin