Jump to content

Recommended Posts

Posted

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?

  • Moderators
Posted

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.

Posted

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)

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
  • Recently Browsing   0 members

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