How do I send> an list element that has been separated.

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Alpha_AI
Pro Scripter
Posts: 61
Joined: Wed Sep 19, 2007 9:30 am

How do I send> an list element that has been separated.

Post by Alpha_AI » Tue Apr 26, 2011 3:49 am

Hello,

I can do this:

Let>ListVars=Force;Mass
Let>ListValues=2;3
Separate>%ListVars%,;,list_names
Separate>%ListValues%,;,list_values
Let>k=0
Repeat>k
Let>k=k+1
Message>list_names_%k%


but I cant do this:
Let>Name = list_names_%k%
Send>%Name%

or I cant do this
Send>list_names_%k%

What am I doing wrong?


Ben

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

Post by Marcus Tettmar » Tue Apr 26, 2011 7:54 am

You *CAN* do this:

Let>Name=list_names_%k%
Send>%Name%

Did you mean to include the spaces?

For compound variables (variables with embedded variables) like this you need to first assign them to a simple variable. As above. Hence Send>list_names_%k% would just send e.g. literal list_names_2 if k was 2.

And unless you are using VAREXPLICIT you don't need the % symbols round Name in the Send line.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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