I am using version 12, so forgive me if this is already in newer versions.
Some way of placing all arrays into one string. For example, RegEx gets a pattern and places each result in an array.
A command that would grab all arrays of a match and place them into a single string.
Such as:
GetArray>Matches,;,MyNumbers
Matches is the array. Simi the Delimeter. MyNumbers the result, containing all resulting arrays of Matches separated by simi.
I thought this would be useful for eliminating having to use loops to create such a string.
PepsiHog
Arrays
Moderators: JRL, Dorian (MJT support)
Arrays
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Arrays
Sounds like you want the opposite of Separate. That's an unusual but novel idea. There's no command to do it at present in one go but it can be done with a simple loop. Here's some code which starts out with a list, comma separated, turns it into an array and then turns it back to a string:
A single line would be nice, but you can easily turn the above into a reusable subroutine.
Code: Select all
Let>list=1,2,3,4,5
Separate>list,comma,items
Let>k=0
Let>newstr=
Repeat>k
Let>k=k+1
Let>this=items_%k%
Let>newstr=%newstr%%this%
If>k<items_count
Let>newstr=%newstr%%comma%
Endif
Until>k=items_count
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Arrays
There is a VBS function - Join(list[,delimiter]) - that takes a one-dimensional array and puts the elements together separated by the chosen delimiter. Could that maybe be used?