Hi I'm trying to append a string to be just what is within the sq brackets. Is this possible?
dir_array = "V01_test_[bob]_01"
--dir_array = GetDirectories (paths+"\\*")
tokens = #()
for c = 1 to dir_array.count do (
folders = filterString dir_array[c] "//" -- e.g. "C:\\Users\\YourName\\Desktop" will yield #("C:", "Users", "YourName", "Desktop")
append tokens folders[folders.count] -- append last element, which is the subfolder
)--end for
try(DestroyDialog Save_Lib)catch()
rollout Save_Lib "Project Manager" width:425 height:173
(
dropDownList ProjectList "Project" height:99 width:99 pos:[13,70] items:tokens
) createDialog Save_Lib
By
Comments (4)
Comment policy
Yes
I'm trying to populate a dropdownlist. Its like I need to select the second one from the end?
example
dir_array = "V01_test_[bob]_01"
--"V01_test_[bob]_01"
wordsArr = filterString dir_array "_"
--#("V01", "test", "[bob]", "01")
trimleft (trimright (wordsArr[wordsArr.count-1]) "]") "["
--"bob"
many ways exists to parse strings in mxs
for example:
Are you trying to fill dropdown list with sub-folders names or something else?