Variable Concatenation Issue

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
wiredsolaris
Newbie
Posts: 10
Joined: Fri Oct 01, 2010 11:57 am

Variable Concatenation Issue

Post by wiredsolaris » Fri Oct 01, 2010 12:11 pm

Currently testing out MS.
I am seeing an issue where when I use at least 3 Let> commands, the third will not concatenante correctly. For Example. I try the following simple script and run through debugger:

Day>dd
Month>mm
Year>yyyy
sub>dd,1

Let>strFolder = C:\Test\
Let>strDate = %yyyy%%mm%%dd%
Let>strFolder2 = %strFolder%%strDate%


Everthing returns find up to strFolder2. It returns %strFolder%%strDate% (litterally) as the value and not the two combined. I can see that strDate combines correctly through the debugger.

If I change it up to look like this (as a test):

Day>dd
Month>mm
Year>yyyy
sub>dd,1

Let>strFolder = C:\Test\ (tried this with and without quotes)
Let>strFolder2 = %strFolder%%mm%

strFolder2 returns %strFolder%10 as the value. It properly entered the month, but did nothing with %strFolder%.

I must be doing something oviously wrong here, or can you not combine variables in such a manner?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Oct 01, 2010 1:25 pm

Remove the spaces.

Read the topic "IGNORESPACES" in the help file if you DO like spaces.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

wiredsolaris
Newbie
Posts: 10
Joined: Fri Oct 01, 2010 11:57 am

Post by wiredsolaris » Fri Oct 01, 2010 3:07 pm

Thank you kind sir. Did the trick.
mtettmar wrote:Remove the spaces.

Read the topic "IGNORESPACES" in the help file if you DO like spaces.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts