Slightly changing script use?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
888
Newbie
Posts: 1
Joined: Fri Oct 05, 2007 7:56 pm

Slightly changing script use?

Post by 888 » Fri Oct 05, 2007 8:11 pm

I have no idea about scripting and i'm new to using macros so please excuse me if I ask some silly questions.

I have a script that was created for me. Its currently set to automatically pull info by starting at ID1 then once the info is copied it goes to ID2 etc etc.

The top of the script looks like this:

Let>_LOCATION_ID=1

There are a few id's where this has made errors so what i would like to do is change it so that I can enter a number of specific id's and it will just pull information from them.

Is there a simple line of code I could enter, then add the id's on the end?

Thanks

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 05, 2007 8:28 pm

For each ID you want to skip, you could just do something like this:

If>ID=4,DoneID
If>ID=10,DoneID
etc

You would add this at the top of the loop

And add this just before the end of the loop where the ID is incremented:

Label>DoneID

Basically it would then skip all processing, jump down to the bottom of the loop before where the ID is incremented. So the loop would then jump back up and carry on.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Fri Oct 05, 2007 8:58 pm

Or put the id's you want to use into an array:

Let>mylist=1:2:5:12:16:17
Separate>mylist,:,myvars
If>myvars_count=0,end
Let>k=0
Repeat>k
Let>k=k+1
Let>_LOCATION_ID=myvars_%k%
MDL>_LOCATION_ID
//do stuff here
Until>k,myvars_count
Label>end

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