Hi,
I'd like to have an "If-Then-Else" structure for variables. I have two types of filenames:
"Dance - Titel - Artist" and "Titel - Artist".
If I want to get the artist out of the filename it's easy:
%?F3;F2%
This is like "If F3 exists, use F3, else use F2"
But for the title I would need something like "If F3 exists, use F2, else use F1".
Alternatively a F1/F2/F3 variable which does not count from the beginning, but from the end, would also solve the task.
CU,
Arthur Dent
If-Then-Else for Variables
Re: If-Then-Else for Variables
You can enforce complex logic using variable scripts in File/Options/Variables %..% (user page)
This one should work ok for you
Click manage create a new one and save it as a file, then it will be available at the user submenu
This one should work ok for you
Code: Select all
begin
if gTag.ParseValue( '%F3%', false, false ) = '' then begin
var_result( gTag.ParseValue( '%F1%', false, false ) );
end else begin
var_result( gTag.ParseValue( '%F2%', false, false ) );
end;
end.