append string
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
Comments
Yes
I'm trying to populate a dropdownlist. Its like I need to select the second one from the end?
many ways exists to parse strings in mxs
for example:
my recent MAXScripts RSS (archive here)
example
bga
Are you trying to fill
Are you trying to fill dropdown list with sub-folders names or something else?
bga