Create ToolBar from directory

In another thread someone was looking for a script that would add all scripts in a directory to a toolbar as custom actions. It was an interesting idea and I had a few minutes, but the request was off topic for the thread, so I am posting my take on it here.

Given the file structure

  • /data/Omni Flux/Scripts/Cool Things
    • Do Cool Thing.dsb
    • Do Cool Thing.dsb.png
    • Do Something Else.dse
    • Do Something Else.png
    • Fix It.dsa
    • Fix It.dsa.png

Run the attached script with the parameter '/data/Omni Flux/Scripts/Cool Things' and it will create a new ToolBar named "Cool Things" with the CustomAction's "Do Cool Thing", "Do Something Else", and "Fix It" with their associated icons.

dsa
dsa
Create ToolBar.dsa
3K

Comments

  • thanks.. looks like an even more streamlined version than the ones I found. 
    ---
    Yes, of course I should seriously learn the scripting language .. but my bucket list is filled for  the next 20 years anyway ... and I only have 19 if I make it to 95 like my Ma. 
    I still remember enough generalized programing to change targets etc within a script. 
    ---
    OTOH.. I build a lot of buildings startting with a wall object with window knockouts
    I wonder if I could script a function that would locate the holes in the mesh, import one of my window units, fit it in and go on and look for the next. .. NEVER MIND that way lies maddness and I skirt that too often anyway. 

Sign In or Register to comment.