PC.MAX Posted April 15, 2006 Share Posted April 15, 2006 what is the difference between ' ' and " " ? Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 15, 2006 Share Posted April 15, 2006 (edited) Hi,maybe this helps.2.3.2 Strings Because a string’s value can be virtually anything, AutoIt needs to be told where strings start and end. This is done by placing a single quote (') or double quote (") at both ends of the string. (You may have noticed that the script from the tutorial uses double quotes.) When a string doesn’t contain either type of quote, whichever one you choose to surround the string makes no difference (personally I prefer the tidier-looking single quotes). If a string should contain one type of quote but not the other then it makes sense to use that other type of quote to surround the string. What happens though if the string should contain both types of quote? In such a case you must nominate which quote you will use to surround the string, and then double up on any occurrences of that quote within the string. Here’s an example of a string containing both types of quote: I'm a string with single and "double" quotes. If we wanted to surround the string with double quotes then we would double up on the double quotes within the string, giving us this: "I'm a string with single and ""double"" quotes." If we wanted to instead use single quotes then we would double up on the single quote and this would be the result: 'I''m a string with single and "double" quotes.'Copied out of a help tutorial. Link http://www.autoitscript.com/forum/index.ph...ic=19434&hl=LxpSo long,Mega Edited April 15, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
w0uter Posted April 15, 2006 Share Posted April 15, 2006 what is the difference between ' ' and " " ?the ascii code and the number of pixels. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Confuzzled Posted April 19, 2006 Share Posted April 19, 2006 what is the difference between ' ' and " " ? If you put a space between the single or double quotes, nothing. This is what makes AutoIT so flexible in that you can intermix these in your code, making for some powerful expressions, particularly when you pass parameters to functions and external programs that expect one or the other type of quote - you can use the other to surround the portion to pass as a parameter and then embed the other type within the parameter. DOS calls is a prime example where a good understanding of this concept can make a difference between a mess and a good subroutine. Just make sure you keep them in matched pairs, eh! 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