Folder scanning ?

For general discussion related FlowStone
User avatar
lalalandsynth
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: Folder scanning ?

Post by lalalandsynth »

trogluddite wrote:What's the reason for needing to know which file was dragged first? Do you need to cycle through them in a particular order or something?


Yes, Say I have a folder with 10 files , I drag number 5 , Then using the "Next" button I would like to advance to number 6 , and Previous vice versa rather then just starting at the beginning of the list or file 1.


Btw: the counter wraps around so eventually by hitting next I would reach number 1 etc.
MichaelBenjamin
Posts: 275
Joined: Tue Jul 13, 2010 1:32 pm

Re: Folder scanning ?

Post by MichaelBenjamin »

.
Last edited by MichaelBenjamin on Mon Sep 21, 2020 10:21 am, edited 2 times in total.
User avatar
lalalandsynth
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: Folder scanning ?

Post by lalalandsynth »

I guess I could scan the list somehow and when I find a match create an index ?

Looking into that ...hmm.
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Folder scanning ?

Post by trogluddite »

"String Array Find" primitive - it does exactly that (Michael will be so pleased with me! :lol: )
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
MichaelBenjamin
Posts: 275
Joined: Tue Jul 13, 2010 1:32 pm

Re: Folder scanning ?

Post by MichaelBenjamin »

.
Last edited by MichaelBenjamin on Mon Sep 21, 2020 10:21 am, edited 2 times in total.
User avatar
lalalandsynth
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: Folder scanning ?

Post by lalalandsynth »

MichaelBenjamin wrote:here's my attempt at a ruby solution then with glob:

Code: Select all

whatiwanttodo ( @refresh_folder.if(^dragndrop_changed_folder )||(^after_load) << YESSS->get?string_from{s%folderarray.at(retrieve(^current_index)}::needing(glob, waveload, #string~output))[]


i guess it's somewhere in the ballpark but probably wont run at first try.


Thanks mate...I am such a Ruby virgin I dont know how to implement that to be honest.
User avatar
lalalandsynth
Posts: 600
Joined: Sat Oct 01, 2016 12:48 pm

Re: Folder scanning ?

Post by lalalandsynth »

trogluddite wrote:"String Array Find" primitive - it does exactly that (Michael will be so pleased with me! :lol: )


hahah, that ....is ...simple !

Spank you guys , this might work :)
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Folder scanning ?

Post by trogluddite »

Michael's code has a bug - he didn't use the "please" method to ask nicely!* :lol:

(* there is actually a computer language where you have to do that - INTERCAL - except that if you do it too often, it refuses to run because it thinks you're patronising!)
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
MichaelBenjamin
Posts: 275
Joined: Tue Jul 13, 2010 1:32 pm

Re: Folder scanning ?

Post by MichaelBenjamin »

.
Last edited by MichaelBenjamin on Mon Sep 21, 2020 10:21 am, edited 1 time in total.
MichaelBenjamin
Posts: 275
Joined: Tue Jul 13, 2010 1:32 pm

Re: Folder scanning ?

Post by MichaelBenjamin »

.
Last edited by MichaelBenjamin on Mon Sep 21, 2020 10:21 am, edited 3 times in total.
Post Reply