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 

A_SPACE

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Thu Oct 21, 2004 7:34 am    Post subject: A_SPACE Reply with quote

Hi Chris,

am I wrong, or should this work?
Code:

a = %A_SPACE%Test
b = Test%A_SPACE%
msgbox, %b%%a%

I expect "test test", but I'll get "testtest"

Tekl
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10463

PostPosted: Thu Oct 21, 2004 12:47 pm    Post subject: Reply with quote

Before assigning anything with a leading or trailing space, use the following:

AutoTrim off

You could put the above near the top of your script to make it the default.
Back to top
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Thu Oct 21, 2004 2:09 pm    Post subject: Reply with quote

Hi Chris,

ups, again a function I have missed.
I thought the autotrim is only for trimming normal spaces/tabs and not the variables %A_SPACE%. Well, for me it's logical that %A_SPACE% works
also if AutoTrim is off, because its inconsequent in my eyes. Then it should also not work for IF-commands.

Tekl
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10463

PostPosted: Thu Oct 21, 2004 3:15 pm    Post subject: Reply with quote

I know it's confusing. It was set up that way to retain compatibility with AutoIt v2.
Back to top
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Thu Oct 21, 2004 4:02 pm    Post subject: Reply with quote

Ok!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports 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