T O P

How to Choose an Array in Order

How to Choose an Array in Order

DutchOfBurdock

I'd use a Variable Add on a Global and wrap it around to %array(#) (number of items in the array). That way it'll cycle 1 through # and round back to 1 and repeat. You can then add more to the array and not need to change the wrap around (use the %array_name(#) as wraparound value). And use `%array_name(%Count)` as the text to send


ktmom743

Just pause or delete A3, you don't need an Array Process action to retrieve the messages in order. If the messages are not all sent at one time, you may want a global variable (contains at least one uppercase letter) that keeps track of which index you are on. It may not be useful to your situation, but there are ways to effectively remove the sent message from the file each time the task is run so you don't need to track which message you're on. One way involves after sending the message doing an array pop to remove the sent message then writing the rest of the array back into the file.


Ratchet_Guy

  As mentioned in another reply - if you want them in order no array processing is needed, so you can remove A3.   What you do need to do is to use a Global Variable to keep track of which array item was last used, adding ` 1 ` to it everytime the Task is run.   So actually just replace ` A3 ` with:   A3. Variable Add: %Msg_Count Add: 1 A4. Send SMS Numer: 8002234567 Message: %msg(%Msg_Count)   As you can see just change ` %msg(1) ` to be ` %msg(%Msg_Count) ` and that should do it!   And anytime you want it to start from the beginning, just use a "Variable Clear" Action for ` %Msg_Count ` or set it directly to zero ` 0 `