Page 2 of 3
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:17 pm
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.
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:18 pm
by MichaelBenjamin
.
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:19 pm
by lalalandsynth
I guess I could scan the list somehow and when I find a match create an index ?
Looking into that ...hmm.
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:20 pm
by trogluddite
"String Array Find" primitive - it does exactly that (Michael will be so pleased with me!

)
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:22 pm
by MichaelBenjamin
.
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:23 pm
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.
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:25 pm
by lalalandsynth
trogluddite wrote:"String Array Find" primitive - it does exactly that (Michael will be so pleased with me!

)
hahah, that ....is ...simple !
Spank you guys , this might work

Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:27 pm
by trogluddite
Michael's code has a bug - he didn't use the "please" method to ask nicely!*
(* 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!)
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:29 pm
by MichaelBenjamin
.
Re: Folder scanning ?
Posted: Thu Mar 05, 2020 10:31 pm
by MichaelBenjamin
.