How to Concatenate variables

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

How to Concatenate variables

Post by Aaron » Wed Apr 18, 2007 6:01 am

Code: Select all

let>X1[1]=124
let>X1[2]=245
let>X1[3]=645
let>X1[4]=215

let>Y1[1]=258
let>Y1[2]=368
let>Y1[3]=152
let>Y1[4]=515

let>i=0

label>start
let>i=i+1
if>i>4,finish
MessageModal>X1[1] + Y1[1]
goto>start
label>finish
Aaron

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

Post by Marcus Tettmar » Wed Apr 18, 2007 6:53 am

You haven't said what your question is, but if you want to know how to concatenate two variables, you can either use ConCat or do this:

Let>newvar=%var1%%var2%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

How to increment through?

Post by Aaron » Wed Apr 18, 2007 3:01 pm

That work , But how do I increment them?

Code: Select all

let>X1[1]=124
let>X1[2]=245
let>X1[3]=645
let>X1[4]=215

let>Y1[1]=258
let>Y1[2]=368
let>Y1[3]=152
let>Y1[4]=515

Let>newvar=%X1[i]%%Y1[i]%

let>i=0

label>start
let>i=i+1
if>i>4,finish
MessageModal>newvar
goto>start
label>finish
[/code]
Aaron

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

Post by Marcus Tettmar » Wed Apr 18, 2007 3:16 pm

Like this:

Code: Select all

let>X1[1]=124
let>X1[2]=245
let>X1[3]=645
let>X1[4]=215

let>Y1[1]=258
let>Y1[2]=368
let>Y1[3]=152
let>Y1[4]=515

let>i=0

label>start
let>i=i+1
if>i>4,finish
Let>t1=X1[%i%]
Let>t2=Y1[%i%]
Let>newvar=%t1%%t2%
MessageModal>newvar
goto>start
label>finish
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

script language

Post by Aaron » Wed Apr 18, 2007 3:29 pm

That works great.

It's kind of confusing to see the way the script works sometimes.

Is this script language specific to Macro Scheduler or is it a language I could get more documentation on somewhere else?

Thanks for all the help.
Aaron

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