eitan Posted February 7, 2007 Posted February 7, 2007 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 SmOke_N Posted February 7, 2007 Moderators Posted February 7, 2007 hican anyone help?i want to asiign to a variable a block of text like javascript codewhich can then be written to file.i want the code stored within the variable without needing to calculate the &" ' and @crlfcharacters.somthing like : $variable= "block of text"where "block of text" can be a page long text with many lines and charactersany 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 . 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.
nobbe Posted February 7, 2007 Posted February 7, 2007 i want to asiign to a variable a block of text like javascript codewhich can then be written to file.i want the code stored within the variable without needing to calculate the &" ' and @crlfcharacters.somthing like : $variable= "block of text"where "block of text" can be a page long text with many lines and charactershiin autoit there is no such thing as the following - i asked the same question before CODE$test=qq~line1 line2line3~;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 reachedWhile 1 $chars = FileRead($file, 1) If @error = -1 Then ExitLoop $test = $test & $chars ; MsgBox(0, "Char read:", $chars)WEndFileClose($file)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now