[Closed] convert 1,3,5-7,10 editText.text to array
- Please help me to convert “1,3,5-7,10” editText.text to array as integers #(1,3,5,6,7,10)
This is an array with ids. - please help me make an editText in maxscript like here: http://key.ciel-design.md/ where min price or maxprice.
You can see inside a text for reference. I would like to have inside “1,3,5-7,10” like an example – written with grey, but once you entered inside to add ids, all this data is cleaned automatically.
Thank you in advance!
etxt = “1,3,5-7,10”
barrayStr = “#{” + (substitutestring etxt “-” “…”) + “}”
fArray = (execute barrayStr) as array
Hmmm… maybe this one
str = "1,2,3,5,7-10"
filterstring str ",-"
--#("1", "2", "3", "5", "7", "10")
as i can guess it’s about frames… it looks like a render frame sequence. so it should allow negative frames, zero frame, and repeated frames… a bitarray solution can’t work in general case
hey, I love this idea with bitarray because It’s giving fast result, but now, when I wanted to implement this to my needs I found that it gives #{1…6} instead of #(1,2,3,4,5,6) and this is not what my script is expecting now. Is it possible to convert this values somehow? If yes, please help me
Thank you soo much. It’s working great. In my case it’s for ID and it should not repeat.
But tell me please, how to change the color of the text inside textbox?