Choch Posted September 12, 2005 Share Posted September 12, 2005 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? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 12, 2005 Moderators Share Posted September 12, 2005 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. Link to comment Share on other sites More sharing options...
seandisanti Posted September 12, 2005 Share Posted September 12, 2005 (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. ieSend("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 September 12, 2005 by cameronsdad Link to comment Share on other sites More sharing options...
MrSpacely Posted September 13, 2005 Share Posted September 13, 2005 (edited) try using single quotes '"'.<{POST_SNAPBACK}>try using double quotes like really double "" like that for "sending 1 "also RTFM7. 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 September 13, 2005 by MrSpacely Link to comment Share on other sites More sharing options...
seandisanti Posted September 17, 2005 Share Posted September 17, 2005 try using double quotes like really double "" like that for "sending 1 "also RTFM7. 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 Topi'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. Link to comment Share on other sites More sharing options...
Valik Posted September 17, 2005 Share Posted September 17, 2005 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. 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