Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Go to containing folder but reselect song

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

Just wanted to know what edit of the command 'browser_gotofolder' i have to make for vdj to go to the containing folder of a song..but reselect the song after..currently it just goes to the folder and selects the song at the top of the folder.
Thanks in advance
 

geposted Thu 07 Nov 19 @ 4:58 pm
Nothing?
 

geposted Sat 09 Nov 19 @ 2:04 am
bump!
 

geposted Wed 13 Nov 19 @ 7:57 pm
locoDogPRO InfinityModeratorMember since 2013
Save the filepath as a string, goto folder, wait 100ms with a 1 time repeat_start, a second repeat_start to compare selected v string, if true there you are stop the repeat, if false scroll down and compare again.
 

geposted Wed 13 Nov 19 @ 8:22 pm
i understand what is the process...but it's difficult for me to put it in script format..
i have been trying to understand two new actions that i have never used...saving the 'get_browsed_filepath' value as a string(do i use cast_param)
...and i have never done two repeat stop scripts in one action..
i humbly ask when you have time...to construct the script...and i shall study it...dissect it into parts so i can have a better understanding of different commands etc and solve my own problems or help others in the forums....thanks again..
ps..i have spent the time since your post until now trying a few things on this matter...my head is hurting now lol
please do not think i am asking to be spoon fed!
 

geposted Wed 13 Nov 19 @ 10:36 pm
locoDogPRO InfinityModeratorMember since 2013
I sort of get the need, a "file_goto" verb is the proper way to do this, but since that verb doesn't exist & since you asked nicely, and that you give it a go. I'll get back with something tomorrow.
On average how many tracks would you have in a folder?
 

geposted Wed 13 Nov 19 @ 11:31 pm
ok kool..my largest folder is about 700 songs...but in time the number will increase obviously...i think you need this to get an average of the scope and ms values of the repeat stop script...am i right?
if so...you can design the script with an average for about 1000 songs..and as time goes on i can edit as required.
p.s do you think it is a valid argument to change the way the 'browser_gotofolder' command currently works from going to the top of the folder to the way i am requesting?
since it will navigate to the parent folder anyway with your eagerly awaited script!
or a command like 'browser_findinfolder' or as u suggested a 'file_goto' could be implemented...just suggestions btw!
 

geposted Wed 13 Nov 19 @ 11:57 pm
locoDogPRO InfinityModeratorMember since 2013
Nope, I'm not a fan of changing existing script function, always rather a new verb with a more descriptive name.
File count I'll explain later.
 

geposted Thu 14 Nov 19 @ 12:37 am
ok loco..point taken..makes sense.
 

geposted Thu 14 Nov 19 @ 12:50 am
locoDogPRO InfinityModeratorMember since 2013
There's this

set 'fileString' `get_browsed_filepath` & browser_gotofolder & repeat_start 'rsWait' 100ms 1 & repeat_start_instant 'rsScrolling' 30ms & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1


set a variable to the filepath of the browsed file.
gotofolder, you know.
1 time repeat start to give the browser a moment [100ms] to switch folders
Unlimited times repeat start [30ms as fast as possible]
compare the file the browser is looking at against the string we saved,
if true we're there, stop the madness
if false, scroll down one and the compare process will repeat


That will do it, one track checked every 30ms so in big folders it could be a bit slow, but it's easy to speed it up to 2 tracks per 30ms, 10 tracks, 50 tracks whatever, just copy paste everything after the repeat_start_instant


set 'fileString' `get_browsed_filepath` & browser_gotofolder & repeat_start 'rsWait' 100ms 1 & repeat_start_instant 'rsScrolling' 30ms & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1 & param_equal `get_browsed_filepath` `get_var 'fileString'` ? repeat_stop 'rsScrolling' : browser_scroll +1


I don't know how many tracks that will check every 30ms, I just spammed ctrl+v a load of times.
I'll invoice you later.
 

geposted Thu 14 Nov 19 @ 10:12 am
thanks a million(the amount of times i 'controlled v' lol..no i actually stopped at 50).
for seeking songs that are at the bottom of a 700 song folder..i copy and pasted the last part 50 times and it took about 3 secs to scroll to the song with no apparent cpu spike(which is good enough for me).thanks for the explanation on saving the filepath...i actually changed the name of the param from 'fileString' to 'FP' for personal preference.
also i was unaware that when querying the param...u had to include the type of variable before the name of what you saved it(param_equal `get_browsed_filepath` `get_var 'fileString')..i was thinking just using the get_var fileString part alone.
one last question...i could not help but notice the different type of quotation marks.this one (`) i had to research and google termed it the grave accent..which i cannot find on my keyboard(i used the copy/paste workaround)..can u explain what is it for..is it a sort of separator? and when it is necessary to use it in future scripting?
 

geposted Thu 14 Nov 19 @ 1:29 pm
locoDogPRO InfinityModeratorMember since 2013
I know them as backticks. They are use fairly often for more advanced scripts. They let the script engine know in between these backticks is script, so treat it as script.
Backticks won't work everywhere [it'd be awesome if they did, scripts would be super dynamic, like builder does without the headaches]
a couple of places backticks are used;
pad names [check zVideoControl to see example]
get_text scripts when you want a script value to be parsed [like builder]
param_ bigger/smaller/equal when you want to compare action values


It's usually the key under escape on most keyboards
alt code
ALT+Numpad9+Numpad6
 

geposted Thu 14 Nov 19 @ 2:04 pm
 

geposted Thu 14 Nov 19 @ 2:05 pm
hey locodog..i encountered a bug in the script.
when i use it at first launch of vdj>>no problems.
so at this stage the browser is at the desired folder and selected the song(all is fine).
if i then search for a song that happens to be in the same folder and then use the script...it remains in the same folder(which is correct) but it goes to the bottom of the list as the browser_scroll +1 part of the script seems to be not stopping and it constantly scrolls down and i cant even focus on the search bar.
if u try replicating the bug..try it about 5 times as it took 3 tries at one point for me...but make sure u search for all the songs in the same folder.
although loco designed the script..help from anyone is appreciated!
ps i used the original script u gave me also to test if my mods was causing the bug(no repetition of the 1st part to speed up the script)
 

geposted Thu 02 Jan 20 @ 9:56 pm
NicotuxHome userMember since 2014
In a way to make it work I slowed the process again ... by adding

& browser_window 'songs' & browser_scroll 'top' & repeat_start 'rsWait' 100ms

just before the repeat_start_instant in a way to
- get sure to browse the files when the folder is the same or when called from a sideview page
- rescan the whole folder from scratch

and had then to force the repeat_start_instant 'rsScrolling' to loop more than once ^^ and then to limit iterations to prevent infinite loop in case the file was removed ...
here is the starting part of the script before the repeat_start_instant 'rsScrolling' :

set 'fileString' `get_browsed_filepath` & browser_gotofolder & repeat_start 'rsWait' 100ms 1 & browser_window 'songs' & browser_scroll 'top' & repeat_start 'rsWait' 100ms 1 & file_count &
 

geposted Fri 03 Jan 20 @ 2:39 am
thanks nico...this seems to have solved the problem! Just curious of what the file_count part of the script did.
 

geposted Fri 03 Jan 20 @ 5:32 am
NicotuxHome userMember since 2014
here file_count takes the number of files in the folder and pass it to repeat_start_instant as third parameter : number of iterations to execute at max

 

geposted Fri 03 Jan 20 @ 6:07 am
Ok cool..so that the script doesnt go into an infinite loop? Ok man..thanks again
 

geposted Fri 03 Jan 20 @ 6:13 am


(Alte Themen und Foren werden automatisch geschlossen)