Page 1 of 2

Automatic file reader

PostPosted: Fri Feb 24, 2017 5:21 am
by tulamide
The schematic tells it all. Please, if you like it, leave a comment. It really is frustrating to provide work which involved hours or sometimes weeks of hard work, and see it downloaded hundreds of times without even a simple thank you. It is simple: I need to be assured that my work is appreciated!

Requirements: FS 3.0.6 or later

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 9:40 am
by Spogg
Sorry but old Mr Thicko Vulcan here doesn't understand how to use this and he needs a hint.

Tried to put paths into the string box but nothing happens. Added an ASIO out but still no action.

Please help an old alien out!

Cheers

Spogg

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 10:05 am
by tulamide
Ah yes, I should have explained that. You don't enter a path but a root folder. This root folder needs to be on the same layer on disk where your plugin is loacated. While developing it is the place on disk where your fsm is located.

When your fsm is located at
C:\somecoolpath\Flowstone\mysuperproject\file_list_07.fsm

then your root folder (let's name it "cool_patches") has to be at
C:\somecoolpath\Flowstone\mysuperproject\cool_patches

in the module you now enter "cool_patches" in the rootfolder string input and that's it. Now everything in that folder will be listed, according to the filter.

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 11:15 am
by Spogg
I did exactly what you said in my current project. I have a folder called Test WAVs so I put this in as the root folder then applied the filter .wav (there are several wav files inside). But I got nothing from your module which I placed inside my project (in FS editor, not VST plugin).

My path to the project is

C:\Users\Rex\FLOWSTONE projects\Quilcom Harvester

The project fsm is found here, and there are in addition 4 folders called Test WAVS, DEVs, Grain position display and Sandbox

I tried using the filter .fsm (and just fsm) for the DEVs folder but still no file display. I was careful with upper-lower case letters and spaces too.

What am I doing wrong?

Cheers

Spogg

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 11:40 am
by tulamide
Most probably there is no issue, but you didn't pay attention to the mouseclicks area floats? They define the active rectangle in which you can click in the view to get the popup menu. By default they are set to 4,5,6,2 (x,y,width,height)
You could set them to the whole view, which in case of the unaltered view I provided is 0,0,10,10

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 12:58 pm
by Spogg
Yay!! Now it works fine and I like it :D
It was the mouse area as you said.

I didn't really know what I was doing so it might help if you put a note into the schematic...

Cheers

Spogg

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 1:16 pm
by nix
Thank you Tula!
I'll add it to the tricks up my sleeve 8D

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 3:44 pm
by Jay
Thats Cool Tulamide! thanks for sharing this!

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 4:26 pm
by Wassaka
OMG!! Thanks you so much!!!!!

Re: Automatic file reader

PostPosted: Fri Feb 24, 2017 9:10 pm
by tulamide
Spogg, good to hear it works now :) (It's the little things so often)

Some more info about its inner working:
- The tree-list is built from scratch each time you click to open the menulist. That means it will recognize whatever changes you make to the folders or files (renaming, moving, copying, deleting, etc) even while running the plugin/fsm.

- The menulist is sorted. It uses an algorithm called "natural sort", which makes you see files in a natural order (opposed to strict ASCII-ABC). Additionally it sorts "files first then folders".

- You can actually make any folder on or beneath the same layer the root folder. Say you have a folder "Data" on the same layer than your plugin/fsm. Inside there are the folders "bin", "ruby", "patches". And inside "patches" you have the folders "factory" and "user". You want to display patches, but don't want the user to have direct access to the content of "factory". Then you would enter the following string as rootfolder:
Data\patches\user

- You can have as many subfolders (or subfolders in subfolders, etc.) as you like.

- Empty folders won't be shown in the list. But if a folder contains another folder, even if that contained folder is empty, it will be shown. That might be confusing, or even lead to issues, but I can't change that behavior. So test extensively if it works ok for you with folders that contain nothing else than another empty folder. Or better yet, prevent it from happening :)

- The view options were meant to simplify the integration of the file list module. You could connect it to your current GUI, define a rectangle within that view as click area and it works.

Have fun :)