Hi there!
I'm trying to build a small browser for published Assets.
What the script will do is showing all maxfiles in a certain folder so you can select the Asset you wanna reference. Later it will Xref the Asset, bring also in it's proxy, link a locator to it and lock the Xref.
The question is, how can I get the files of a folder in a rollout listbox?
This is what I came up with so far:
projectRoot = pathConfig.removePathLeaf maxfilepath + "\\"
pubPath = projectRoot + "Assets\PUB\\"
pubFiles = pubPath + "*PUB.max"
files = getFiles pubFiles
rollout Referencer "Referencer" width:394 height:426
(
label 'lbl9' "Reference Assets" pos:[157,17] width:93 height:39 align:#left
listbox objectToKill "Objects:" items:(for o in files collect o) pos:[31,61] width:330 height:20 align:#left
button 'refBtn' "Reference" pos:[119,358] width:139 height:40 align:#left
on refList selected sel do
(
)
on refBtn pressed do
(
)
)
So I get the content of the folder in the list. Now I guess I have to create an array which is corresponding with the list storing the file path informations. How can I create that and read it out?
Thanks :)