Page 1 of 1
Fill at same time the same field of different movies
Posted: 2013-05-02 22:46:44
by al0203
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.
Posted: 2013-05-03 08:54:58
by antp
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
Posted: 2013-05-05 03:54:18
by al0203
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
Can you write me a script that put the value 1 in the custom field NQV of the movies that are checked?
Thankyou
Posted: 2013-05-05 20:19:39
by antp
Code: Select all
program NewScript;
begin
if GetField(fieldChecked) = 'True' then
begin
SetCustomField('NQV', '1');
end;
end.
Posted: 2013-05-05 20:42:59
by al0203
antp wrote:Code: Select all
program NewScript;
begin
if GetField(fieldChecked) = 'True' then
begin
SetCustomField('NQV', '1');
end;
end.
Great!
Posted: 2013-05-13 22:11:50
by al0203
al0203 wrote:antp wrote:Code: Select all
program NewScript;
begin
if GetField(fieldChecked) = 'True' then
begin
SetCustomField('NQV', '1');
end;
end.
Great!
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?
Posted: 2013-05-13 23:26:00
by soulsnake
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.
Posted: 2013-05-14 02:15:17
by al0203
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.
I wrote this and it gave me error in the line found := (StrToInt(GetField('ColorTag'), 0) = 3)
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.
Posted: 2013-05-14 06:51:15
by soulsnake
Hi,
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.
Soulsnake.
Posted: 2013-05-14 07:54:01
by al0203
soulsnake wrote:Hi,
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.
Soulsnake.
Thank you.
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.
Posted: 2013-05-14 08:57:03
by soulsnake
You can use copy(string, pos, length) function like this:
Code: Select all
copy('a string', 1, 3) will return 'a s'.
copy('a string', 3, 6) will return 'string'.
Soulsnake.