Sign in to follow this  
Followers 0
eitan

embedding text

3 posts in this topic

hi

can anyone help?

i want to asiign to a variable a block of text like javascript code

which can then be written to file.

i want the code stored within the variable without needing to calculate the &" ' and @crlf

characters.

somthing like : $variable= "block of text"

where "block of text" can be a page long text with many lines and characters

any ideas?

Share this post


Link to post
Share on other sites



hi

can anyone help?

i want to asiign to a variable a block of text like javascript code

which can then be written to file.

i want the code stored within the variable without needing to calculate the &" ' and @crlf

characters.

somthing like : $variable= "block of text"

where "block of text" can be a page long text with many lines and characters

any ideas?

I can see you tried to explain yourself... but some sample code and possible strings would be nice. I'm not sure I'm understanding whether you want to exclude some text or include it. I'm going to assume you are wanting to store the information from a GUI / or WinGetText / or ControlGetText, so how about helping us to help you :whistle:.

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.

Share this post


Link to post
Share on other sites

i want to asiign to a variable a block of text like javascript code

which can then be written to file.

i want the code stored within the variable without needing to calculate the &" ' and @crlf

characters.

somthing like : $variable= "block of text"

where "block of text" can be a page long text with many lines and characters

hi

in autoit there is no such thing as the following - i asked the same question before :whistle:

CODE
$test=qq~

line1

line2

line3

~;

so my workaround ist now to put all relevant text into a file , and load file into a variable..

CODE
$file = FileOpen(".\karte.htm", 0)

$test = "";

; Read in 1 character at a time until the EOF is reached

While 1

$chars = FileRead($file, 1)

If @error = -1 Then ExitLoop

$test = $test & $chars

; MsgBox(0, "Char read:", $chars)

WEnd

FileClose($file)

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