Jump to content

Recommended Posts

Posted

I always use " as a quotation when creating scripts. If I needed to use the " character in a string I would just use "string part1" & Chr(34) & "string part 2".

Today I created a small script, which does some parsing for a friend of mine and I ended up using ' as quotation characters, since this was easier with using command line parameters and the parsing.

Right now I'm trying to figure out the appropriate usage of " and ' (is it "=double quote and '=single quote?), but I can't find solid info.

Found this in the helpfile:

NOTE: Correct usage of single- and double- quotation marks is important, even double single.

But I couldn't find the explanation of correct usage. And what is a "double single" ('' ?)?

What is the appropriate way to use quotation marks in AutoIT?

Posted

I always use " as a quotation when creating scripts. If I needed to use the " character in a string I would just use "string part1" & Chr(34) & "string part 2".

Today I created a small script, which does some parsing for a friend of mine and I ended up using ' as quotation characters, since this was easier with using command line parameters and the parsing.

Right now I'm trying to figure out the appropriate usage of " and ' (is it "=double quote and '=single quote?), but I can't find solid info.

Found this in the helpfile:

But I couldn't find the explanation of correct usage. And what is a "double single" ('' ?)?

What is the appropriate way to use quotation marks in AutoIT?

Single and double quotes are interchangeable to AutoIt. Either can be used to enclose a string. Either can be used to enclose a literal of the other. Either can be doubled-up (i.e. '', or "") to insert a literal of itself when enclosed by the same.

Just try some examples in SciTE. You'll catch on.

>_<

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

Either can be doubled-up (i.e. '', or "") to insert a literal of itself when enclosed by the same.

Didn't know this. Thanks!

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
×
×
  • Create New...