Sign in to follow this  
Followers 0
JCrane2

Escaping the At-Sign

4 posts in this topic

I just upgraded to v3.1.1.71 (beta) to see if this problem was fixed, but it still hasn't been fixed. I want to use

Opt("ExpandVarStrings", 1)
, but when I do, the string "@@" doesn't escape to a single "@", it still evaluates to "@@". If I use a single "@", AutoIt tries to perform a substitution (working as designed). This is a huge bug if you are working with Email addresses.

The following code illustrates this problem:

ConsoleWrite("1. johnrc2@austin.rr.com" & @CRLF)
ConsoleWrite("2. johnrc2@@austin.rr.com" & @CRLF)

Opt("ExpandVarStrings", 1)   ;0=don't expand, 1=do expand
ConsoleWrite("3. johnrc2@austin.rr.com" & @CRLF)
ConsoleWrite("4. johnrc2@@austin.rr.com" & @CRLF)

Opt("ExpandVarStrings", 0)   ;0=don't expand, 1=do expand
ConsoleWrite("5. johnrc2@austin.rr.com" & @CRLF)
ConsoleWrite("6. johnrc2@@austin.rr.com" & @CRLF)

This is what gets written to the console. Unless I am doing something wrong, item #4 is incorrect. It should read: "johnrc2@austin.rr.com. (single "@")

1. johnrc2@austin.rr.com

2. johnrc2@@austin.rr.com

3. johnrc2

4. johnrc2@@austin.rr.com

5. johnrc2@austin.rr.com

6. johnrc2@@austin.rr.com

Share this post


Link to post
Share on other sites



1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: "This is a single dollar $$ sign".

Looks like a bug to me.

This works.

Opt("ExpandVarStrings", 1)
ConsoleWrite("3. johnrc2$austin.rr.com" & @CRLF)
ConsoleWrite("4. johnrc2$$austin.rr.com" & @CRLF)

This does not.

Opt("ExpandVarStrings", 1)
ConsoleWrite("3. johnrc2@austin.rr.com" & @CRLF)
ConsoleWrite("4. johnrc2@@austin.rr.com" & @CRLF)

Share this post


Link to post
Share on other sites

I have as well ran into this problem, does anyone have a solution. This is kinda being a pain in my rear, he he

Share this post


Link to post
Share on other sites

I have as well ran into this problem, does anyone have a solution. This is kinda being a pain in my rear, he he

<{POST_SNAPBACK}>

quick work around is to concatenate Chr(64) into your string...like:

$addy = "yourname" & Chr(64) & "blah.com"
;returns "yourname@blah.com"

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

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