快速登录:  

Forum: Old versions

话题: clone deck or load track - script help pls

由于该帖子已年深日久,可能包含陈旧过时或描述错误的信息。

PachNPRO InfinityMember since 2009
A german user asked if it was possible to clone deck B to A if the selected file in browser is the same as the one already playing on B. Otherwise just load the track to A.

This is what I tried but didn't work:

get_browsed_filepath & param_equal "`deck 2 get_filepath`" "string" ? deck 2 clone_deck : deck 1 load

 

发表时间 Mon 26 Oct 15 @ 7:17 pm
locoDogPRO InfinityModeratorMember since 2013
Shouldn't it be

deck 1 clone_deck 2
 

发表时间 Mon 26 Oct 15 @ 8:28 pm
PachNPRO InfinityMember since 2009
Thought so yes, but vdj will clone it to the opposite deck of the selected(?) One.

But that is not the part that is not working.
The if-comparison doesn't work.
 

发表时间 Tue 27 Oct 15 @ 8:32 am
locoDogPRO InfinityModeratorMember since 2013
param_equal '`deck 2 get_filepath`' 'M:\Music\Breaks\Brassic Beats Vol. 2 - 1997\Indian Rope Man - Indian Rope Man.flac' ? blink : on


This is working here (blinking a custom or on )
 

发表时间 Tue 27 Oct 15 @ 9:41 am
locoDogPRO InfinityModeratorMember since 2013
Here you go.

param_equal '`deck 2 get_filepath`' '`get_browsed_filepath`' ? deck 2 clone_deck 1 : deck 1 load

Tell the user I'll invoice them later.
 

发表时间 Tue 27 Oct 15 @ 9:50 am
PachNPRO InfinityMember since 2009
Aha, that is the syntax for the param equal command.
The vdj description for this command is rather poor.
Or I'm too stupid to get it.

Thanks in advance and I'll tell him about your invoice.
 

发表时间 Tue 27 Oct 15 @ 12:30 pm
locoDogPRO InfinityModeratorMember since 2013
I agree with the syntax being a bit unclear, I just keep trying things,

The "param" scripts I do sometimes need to take a few attempts at.
 

发表时间 Tue 27 Oct 15 @ 12:58 pm
AdionPRO InfinityCTOMember since 2006
The old v7 syntax (get_x & param_equal y) compares only numbers.
The syntax with 2 parameters compares strings (param_equal "`action1`" "`action2`" or param_equal "`action1`" "string")
 

发表时间 Tue 27 Oct 15 @ 1:21 pm
PachNPRO InfinityMember since 2009
Yeah, if you know this it is totally clear and makes sense. And if you know this the description is okay too. But as you can see in my attempt I thought I had to put “string“ behind the param thing because the thing I wanted to compare was a string. I thought it was kind of a type casting.

I tried a lot of different versions with different “ and ' and ` but not this one.

Maybe you can change “string“ in the description to “someText“. Makes it more clear a) because a normal user might not know what a string type is and b) someone who knows it might get confused. Just like me.
 

发表时间 Tue 27 Oct 15 @ 5:33 pm


(陈旧帖子或论坛版块会自动关闭)