Se Connecter:     


Forum: General Discussion

Sujet: Script ?

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

Files are tagged properly. Looking for a way to choose multiple titles and add something to the end of the title.
 

Posté Wed 19 Jun 19 @ 2:00 pm
Append tags, not sure if vdj can do that on its own, i know you can with the builder addon (Windows) in fact i think i posted the script for builder, I'll check.
 

Thanks looking forward to try.
 

I've found the script, I'll adapt it later this evening.
 

Sorry forgot about this;
Here's the basics, enough I think for you to get started, if you can't get it to work post back and we'll figure it out.
locodog wrote :
A user wanted to append tags, I don't think this isn't possible with straight script but you can with builder :-)

This example takes fields 1 & 2 adds a comma inbetween them and then writes to field 1 and clears field 2

I used a custom button to set fields 1 & 2
browsed_song 'Field1' 'erm' & browsed_song 'Field2' 'yes'

I then used another custom to get builder to read/parse field1 insert a comma and read/parse field 2, then I added a bit more script to read builders string and cast it to field 1 & also cleared field2
get_text "`get_browsed_song 'Field1'`,`get_browsed_song 'Field2'`" & param_cast "text" & effect_string 'builder' 1 & get_effect_string 'builder' 1 & browsed_song 'Field1' & browsed_song "Field2" ""
 

using the same button
browsed_song 'Field1' 'erm' & browsed_song 'Field2' 'yes'

this one can be done without the need of builder :
get_text "`get_browsed_song 'Field1'`,`get_browsed_song 'Field2'`" & param_cast "text" & browsed_song 'Field1' & browsed_song "Field2" ""

because it is only used as a string variable in this case
 

So it does, I never tried this simpler application

get_text "`get_browsed_song 'title'` YOURTEXT" & param_cast "text" & browsed_song 'title'
 

Thanks, unfortunately cannot get it to work.
What I am trying to do is.
Choose multiple song titles, within VDJ add a comment
at the end of the song title.

Example: song title [word]
I think you would need a filter folder with a certain script.
Then choose multiple songs and add the filter.
Would this be the correct way?
 

If i understand you want to alter a set of tracks by adding some common [word] to every title

What i would do is first to create a playlist with these files
if you wanna add the same [word] to all the titles previous scripts will work

Here is a proposal i would try:
- use the "Text" plugin as a text input box not to have to alter the script every time
- script to add the [word] to the title only if not already present
- iterate all the playlist

I call this button " Append `get_effect_string text 2`"

The script:
effect_show_gui text & repeat_start 'rept' 300ms -1 & effect_show_gui text ? nothing : repeat_stop rept & get_effect_string text 2 '' ? nothing : sideview sidelist & browser_window sideview & browser_move top & repeat_start_instant 'rept' 30ms -1 & get_browsed_song title & param_cast text & param_contains "`get_effect_string text 2`" ? browser_scroll +1 : get_text "`get_browsed_song 'title'``get_effect_string text 2`" & param_cast text & browsed_song title & set pos "`get_browsed_selection_index 99999`" & browser_scroll +1 & param_equal "`get_var pos`" "`get_browsed_selection_index 99999`" ? repeat_stop rept : nothing

Usage:
Create a playlist with the files to be alteres
click the button
enter text
close the gui
wait the browser to reach bottom
you are done

may enhance the script by testing text is not empty to abort
 

if its simply to add a comment...
alter the comment field

If you wanna alter the filename you need select all the files in the playlist and tag edit the block and rename as "Artist - Title (Comment)"
all files will become "Artist - Title [word] (Comment).ext"
and then batch reload tags

take care of adding initial space and bracket in the text input box
 

effect_show_gui text &
repeat_start 'rept' 300ms -1 &
effect_show_gui text
..? nothing
..: repeat_stop rept &
....get_effect_string text 2 ''
....? nothing
....: sideview sidelist &
......browser_window sideview &
......browser_move top &
......repeat_start_instant 'rept' 30ms -1 &
......get_browsed_song title &
......param_cast text &
......param_contains "`get_effect_string text 2`"
......? browser_scroll +1
......: get_text "`get_browsed_song 'title'``get_effect_string text 2`" &
........param_cast text &
........browsed_song title &
........set pos "`get_browsed_selection_index 99999`" &
........browser_scroll +1 &
........param_equal "`get_var pos`" "`get_browsed_selection_index 99999`"
........? repeat_stop rept
........: nothing
 



(Les anciens sujets et forums sont automatiquement fermés)