OT: AutoIt syntax for typing in ", quotation marks, to send?

  • Thread starter Thread starter fitwell
  • Start date Start date
F

fitwell

Hi everyone! Making great strides with AutoIt.

There is a problem I'm having that some of you AI veterans might be
able to help me with. How does one input quote marks to send?

Here's the script in question:


;
; AutoIt v3.0
;


Send("{enter}{enter}<{!}--HTML doc's URL{:}-->{enter}<b><font
color={#}00FFFF><A
HREF="">{enter}{enter}<{/}A><{/}b><{/}font>{enter}<br>{enter}<br>{enter}<br>{enter}{enter}{enter}{enter}{up}{up}{up}{up}{up}{up}{up}{up}{left}{left}")

; Finished!


As one can see, there are TWO quotation marks after the A HREF tag
coding. When run, the above produces this text (I'll use it now so
you can see):




<!--HTML doc's URL:-->
<b><font color=#00FFFF><A HREF=">

</A></b></font>
<br>
<br>
<br>



See? The second quote mark after the A HREF isn't input. There is no
delete syntax or anything to take it away, it just doesn't get typed.
In PowerPro, encasing certain scripting elements allows them to be
typed. If # doesn't work, for example, then one would use {#} and
then it's recognized as text to send.

How would one input the quote marks in AI so that they work?

I looked and looked through the help file but couldn't find anything.

Thanks bunches.
 
Just checked the help file and it doesn't appear to have an "escape"
sequence like the other special characters do. Failing that, I always
use chr(34). Because the strings get sorta bulky in these instances, I
usually use a variable for the string then put the variable in the Send
command, to wit:

Dim $HTMLstr
$HTMLstr = chr(10) & chr(10) & "-HTML doc's URL{:}-->" & chr(10) _
blah, blah blah _
"<A HREF = " & chr(34) & ...

See, it is klunky. But it works. Chr(10) is LineFeed and works like
pressing [Enter].
 
fitwell said:
Hi everyone! Making great strides with AutoIt.

There is a problem I'm having that some of you AI veterans might be
able to help me with. How does one input quote marks to send?

You've got two easy choices, plus a bunch of more difficult ones. The
easy choices are:

Double up on the quote marks in your string. For example
"A string with ""quotes"" in it."
comes out as
A string with "quotes" in it.

Or, use a single quote (apostrophe) to delimit the string. For example
'A string with "quotes" in it.'

I usually find the second choice easier, unless I want *both* single
and double quotes in the string.

Tony G
 
Back
Top