Jump to content

Storing multi-line string


Recommended Posts

Hi,

I created a script that generates an email message, but I'm stuck as how to store the signature. I tried to save the signature in an ini file, but because there is more than one line in the signature, the iniread function only reads the first line. Any ideas?

Link to comment
Share on other sites

$siggy = "Line 1" & @CRLF & "line 2" & @crlf & "line3" & @crlf & "line 4"
;do w/e

$siggy would look like this in an email or a txt file:

line 1

line 2

line3

line 4

--hope this helps

~cdkid

Edited by cdkid
AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

  • Moderators

Joon gave a good idea here for you modernes.

$String = StringReplace(GUICtrlRead($Edit1), @LF, Chr(01))
IniWrite('FilePath', 'Section', 'Key', $String)

On extraction:

$sSplit = StringSplit(IniRead('FilePath', 'Section', 'Key', 'Not Found'), Chr(01))
$TestTheory = ''
For $i = 1 To Ubound($sSplit) - 1
    $TestTheory = $TestTheory & $sSplit[$i] & @LF
Next
MsgBox(0, 'Testing', $TestTheory)
Untested, and typed in the forum box...

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...