Sign in to follow this  
Followers 0
Diana (Cda)

Syntax for quotation marks in "Send"??

8 posts in this topic

I need to add the source URL to saved webpages. I've been doing it this way via Notepad for years and I like it and it works for me. (Various URL-injecting apps never did the job reliably and this is so easy.) But I've been running into trouble with one of the quotes needed. Here is the script as it stands now:

;

; 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!

The above code works fine except that the second set of quotation marks gets left out. That's the set of quotes found after the HREF reference (<A HREF="">). When run, the above script gives me exactly this:

<!--HTML doc's URL:-->

<b><font color=#00FFFF><A HREF=">

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

<br>

<br>

<br>

After the A HREF, only one can be seen. Quotes are used with the send process in AI to start and stop what is being sent, I know (syntax: Send("")). But how can I fix this, pls? I've looked in the help file, of course, but I couldn't find anything re this. I'm hoping that there's a way to properly input these marks for being sent as text. The usual type of workaround, {"}, just causes errors. :huh2:

I'm currently using beta v102, though have to say that the same thing happened in 101.

Thanks. :D

Share this post


Link to post
Share on other sites



See FAQ #7 about quotation mark issues.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

I believe this is what you need, try it,

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}")

You can see:

from Autoit Help,

language reference->datatypes

see the strings section.

Share this post


Link to post
Share on other sites

I still vote for :

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}""")


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I still vote for :

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}""")

Whenever I get confused about quotes, which is quite a bit I put the whole line in a var with a msgbox to check my var

;runwait(@scriptdir & "/c "c:\my spaced folder\my.exe")

$var=@scriptdir

$var=$var& " /c"

msgbox(4096,"var",$var)

You get the idea

Rick


Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

Share this post


Link to post
Share on other sites

Thank you, everyone! I ended up, with the help of a kind internet friend, finding out about AU3ScriptWriter III. When I typed in the code, it came up with an easy fix to the quotes problem (yes, dejà vu for the forum, maybe, but I'm new to AI and this forum, so didn't know there had been a post. A search of the forum initially, before posting my question, yielded nothing with "quote" or "quotation" in the subject line <g>).

AI can handle sending quotes like this:

{SHIFTDOWN}''{SHIFTUP}

So my send script looks like this:

;

; AutoIt v3.0

;

Send("{enter}{enter}<{!}--HTML doc's URL{:}-->{enter}<b><font color={#}00FFFF><A HREF={SHIFTDOWN}''{SHIFTUP}>{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}{left}")

Exit

; Finished!

Works perfectly!

Share this post


Link to post
Share on other sites

I only said "dejà vu" because you posted the same question earlier .... :D

Also understand now what you wanted to have as end result..

The way Larry did it works (Ofcourse), but this also works:

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}{left}")

As Lyra also mentioned...

Any time when you are inside a double quoted string and you need a double quote you achieve that by doing the double qulbe twice .

So " "" " results in a " as string.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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