yappernj Posted September 25, 2008 Share Posted September 25, 2008 I am trying to write a script that will Send a string with a variable into a field of entry. The problem is that the string has quotes and parentheses in it and no matter what I try I either get a "Unterminated String" error, or an error that says "The instruction at "0x00411c63 referenced memory at "0xffffffff". The memory could not be "read".What I need to Send is exactly this: ExtFml("StockList.FilterSecurity","C:\Watchlists\SP500_Sells.txt") - where the SP500_Sells.txt is a variable ($fileVariableName) that is read in from a list of files in a folder.There is a lot of simple code ahead of this line that gets me to this field of entry, but what I have been playing around with is this:Send("ExtFml("StockList.FilterSecurity", "C:\Watchlists\ & $fileVariableName & '""')), as well as many, many variationsNo matter what I have tried (and I have tried 100s of things including single quotes, double quotes, single quotes around double quotes, ASCII characters for the last quotation mark and closed parenthesis, etc... ) and I just cannot get the script to send this line of text. All of the code above works fine so the error is not coming from anywhere else, only when I try to execute this line with it.Can anyone shed any light on a potential solution? There's probably something simple that I am missing. Many thanks in advance. I've been lurking here for little awhile and have learned a lot from the contributors, but this one escapes me. Link to comment Share on other sites More sharing options...
DW1 Posted September 25, 2008 Share Posted September 25, 2008 (edited) $var = "SP500_Sells.txt" Send('ExtFml("StockList.FilterSecurity","C:\Watchlists\' & $var & '")') EDIT: To learn why yours was failing look in the help file: If you want to use double-quotes inside a string then you must "double them up". So for every one quote you want you should use two. For example if you wanted to set a variable to the string: A word in "this" sentence has quotes around it! You would do: $var = "A word in ""this"" sentence has quotes around it!" or use single quotes instead: $var = 'A word in "this" sentence has quotes around it!' Edited September 25, 2008 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
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