Sign in to follow this  
Followers 0
Choch

Sending quote marks

6 posts in this topic

Hey guys.. I'm new to this forum - I tried to find an answer for this question that had been earlier posted, but i couldn't, so hopefully it hasnt been asked yet. If it has, im sorry, i tried - Anways.....

I'm having problems with the send command- Im writing a batch file using autoit, and I get problems when i try to send " marks. ie

Send("xcopy /e /y /i /c "C:\Program Files\test.txt" "C:\Windows\"{ENTER}"C:\Windows\"")

How do I avoid closing the quote, and actually send the quote mark key?

Share this post


Link to post
Share on other sites



try using single quotes '"'.


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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hey guys.. I'm new to this forum - I tried to find an answer for this question that had been earlier posted, but i couldn't, so hopefully it hasnt been asked yet. If it has, im sorry, i tried - Anways.....

I'm having problems with the send command- Im writing a batch file using autoit, and I get problems when i try to send " marks. ie

Send("xcopy /e /y /i /c "C:\Program Files\test.txt" "C:\Windows\"{ENTER}"C:\Windows\"")

How do I avoid closing the quote, and actually send the quote mark key?

<{POST_SNAPBACK}>

one thing you could do is use Chr(34) for the quotes...

msgbox(0,"quotes","this method would send a " & Chr(34) & " when you want to.")

***edit*** oops, used Asc instead of Chr the first time around...

Edited by cameronsdad

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

try using single quotes '"'.

<{POST_SNAPBACK}>

try using double quotes like really double "" like that for "sending 1 "

also RTFM

7. Why do I get errors when I try and use double quotes (") ?

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

Back To Top

Edited by MrSpacely

Share this post


Link to post
Share on other sites

try using double quotes like really double "" like that for "sending 1 "

also RTFM

7. Why do I get errors when I try and use double quotes (") ?

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

Back To Top

i'm seeing alot of RTFM's lately, atleast one of them i've agreed with, but not many. I definitely disagree with giving someone an RTFM on their first post, especially after a solution has been offered. It's one thing to quote the manual, or even refer then to the help file in lieu of solving their problem for them. But just because something is mentioned in the help file does not mean it warrants that kind of a reply. I think it's a safe bet that just a good majority of us first came to this forum for help on something that was covered in the manual that we failed to find or interpret correctly. Sorry i don't mean to go off on a rant about this, but i don't want that person reading this about to register to ask for help to worry about being treated like an idiot because someone who's used the language longer might think it a stupid question. blah. Ok i've officially wasted too much time posting on a thread that already had a solution.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

cameronsdad, it's inexcusable to ask this question for 3 reasons:

  • The help file contains information on how to use quotes.
  • The help file contains the information in the FAQ which should be one of the first places somebody looks for an answer.
  • This forum has the FAQ stickied with the sub-heading "Read me first before posting"
Ranting about people saying "RTFM" is just as "bad" as people saying "RTFM" since you're justifying the user's inability to follow reasonable procedure and check out the posting rules of the forum (I consider a stickied topic that says "Read me first" to be a rule).

Just keep that in mind the future.

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