AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

why `n must be enclosed with double-quotations?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue Jun 10, 2008 3:52 pm    Post subject: why `n must be enclosed with double-quotations? Reply with quote

Since ` isn't valid character for variable name

This would work too imo
Code:
MsgBox % Variable `n Variable
don't you think?

Code:
MsgBox % Variable "`n" Variable "`n" Variable "`n" Variable "`n" Variable "`n" Variable "`n" Variable "`n" Variable "`n" Variable "`n" Variable
is very annoying!
Back to top
SKAN



Joined: 26 Dec 2005
Posts: 6084

PostPosted: Tue Jun 10, 2008 4:14 pm    Post subject: Reply with quote

I feel it is better the current way and you can always work around it like:

Code:
_=`n

MsgBox, % A_UserName _ A_ComputerName


Smile
_________________
Back to top
View user's profile Send private message
Oberon



Joined: 18 Feb 2008
Posts: 458

PostPosted: Tue Jun 10, 2008 9:46 pm    Post subject: Reply with quote

You can also use the non-expression method i.e. MsgBox, %var%`n%var2% etc..
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Aug 23, 2008 9:56 pm    Post subject: Reply with quote

i like to use since it is a standard symbol used by a lot of apps ie MS Word for the line break

i have :
= `n
in an include file that is included in all my scripts

so:
Code:
MsgBox % Variable "`n" Variable "`n" Variable "`n" Variable "`n" Variable


becomes:
Code:
MsgBox % Variable Variable Variable Variable Variable
Back to top
Krogdor



Joined: 18 Apr 2008
Posts: 1020
Location: The Interwebs

PostPosted: Sun Aug 24, 2008 12:50 am    Post subject: Reply with quote

I didn't know was valid in a variable name Shocked

Especially since the help file says...
Quote:
Variable names may be up to 254 characters long and may consist of letters, numbers and the following punctuation: # _ @ $ ? [ ]
Back to top
View user's profile Send private message AIM Address
Guest






PostPosted: Mon Aug 25, 2008 4:55 pm    Post subject: Reply with quote

Krogdor wrote:
I didn't know was valid in a variable name Shocked



it is - along with - (from testing)
# $ ? @ [ ] _ ` (129) (141) (143) (144) (157)(160)
Back to top
Krogdor



Joined: 18 Apr 2008
Posts: 1020
Location: The Interwebs

PostPosted: Mon Aug 25, 2008 7:25 pm    Post subject: Reply with quote

Well that's nice to know...

That should probably be in the help file o_O
Back to top
View user's profile Send private message AIM Address
Guest






PostPosted: Mon Aug 25, 2008 7:56 pm    Post subject: Reply with quote

Chris has done a superb job with the documentation, but there are still a number of omissions and features not included (some apparently on purpose)

Iv'e done a lot of testing and have discovered several things that aren't in the manual so I'm thinking of starting a new thread - "Extended Documentation"
Back to top
Krogdor



Joined: 18 Apr 2008
Posts: 1020
Location: The Interwebs

PostPosted: Mon Aug 25, 2008 9:08 pm    Post subject: Reply with quote

Plus, some things are kinda hard to find... I have to do a search to even find the full Command List, and I didn't even know about OnClipboardChange until very recently when I saw it in a thread on the forum :\

But yeah, I agree that the documentation is great, much better than most docsthere is just soo much there.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group