Fill at same time the same field of different movies
Fill at same time the same field of different movies
Is it possible to fill the same field of different movies with same vale at ones? Like selecting all the files that you want to fill the custom file "already watched" and to change all at the same time. Some programs if you select several files and you change a value it changes that value in all the files at same time.
Can you write me a script that put the value 1 in the custom field NQV of the movies that are checked?antp wrote:There is a script "update fields" that allows that (or you could yourself write a custom script: it is a matter of 1 or 2 lines of code)
You can find that script in Tools->Scripting
Thankyou
Code: Select all
program NewScript;
begin
if GetField(fieldChecked) = 'True' then
begin
SetCustomField('NQV', '1');
end;
end.
Great!antp wrote:Code: Select all
program NewScript; begin if GetField(fieldChecked) = 'True' then begin SetCustomField('NQV', '1'); end; end.
I tried to do the same with Color Tag field, but I don´t know how the computer name this field. Which is the name of this field and where I can see the names of all the fields?al0203 wrote:Great!antp wrote:Code: Select all
program NewScript; begin if GetField(fieldChecked) = 'True' then begin SetCustomField('NQV', '1'); end; end.
I wrote this and it gave me error in the line found := (StrToInt(GetField('ColorTag'), 0) = 3)soulsnake wrote:Hi,
You can find all the fields in help file (press F1 in AMC) and go in technical scripting section.
For color tag the field name is: fieldColorTag
You have to put a color tag between 0 (blank) and 12 (grey).
Soulsnake.
Code: Select all
program SFilt;
var
found: Boolean;
begin
found := true;
if found then // Search on movie ColorTag
found := (StrToInt(GetField('ColorTag'), 0) = 3)
if found then // Check movie if found
SetField(fieldChecked, 'True');
end.
Last edited by al0203 on 2013-05-14 07:43:39, edited 1 time in total.
Hi,
This is not the good syntax.
Use this code:
Soulsnake.
This is not the good syntax.
Use this code:
Code: Select all
program SFilt;
var
found: Boolean;
begin
found := true;
if found then // Search on movie ColorTag
found := (StrToInt(GetField(fieldColorTag), 0) = 3)
if found then // Check movie if found
SetField(fieldChecked, 'True');
end.
Thank you.soulsnake wrote:Hi,
This is not the good syntax.
Use this code:Soulsnake.Code: Select all
program SFilt; var found: Boolean; begin found := true; if found then // Search on movie ColorTag found := (StrToInt(GetField(fieldColorTag), 0) = 3) if found then // Check movie if found SetField(fieldChecked, 'True'); end.
Witch is the function that return you a part of a string like it use to be in basic str(getfield(fieldName),3) to return the first 3 characters of the name or str(getfield(fieldName),3,4) for 3rd to the 6th characters.
You can use copy(string, pos, length) function like this:
Soulsnake.
Code: Select all
copy('a string', 1, 3) will return 'a s'.
copy('a string', 3, 6) will return 'string'.