| View previous topic :: View next topic |
| Author |
Message |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Thu Oct 21, 2004 7:34 am Post subject: A_SPACE |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Thu Oct 21, 2004 12:47 pm Post subject: |
|
|
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 |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Thu Oct 21, 2004 2:09 pm Post subject: |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
Posted: Thu Oct 21, 2004 3:15 pm Post subject: |
|
|
| I know it's confusing. It was set up that way to retain compatibility with AutoIt v2. |
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Thu Oct 21, 2004 4:02 pm Post subject: |
|
|
| Ok! |
|
| Back to top |
|
 |
|