Using Auto.Tools Script to Batch Edit Custom Fields

If you need help on how to use the program
Post Reply
revjoeyreed
Posts: 5
Joined: 2017-11-13 21:09:46

Using Auto.Tools Script to Batch Edit Custom Fields

Post by revjoeyreed »

I cannot figure out how to use Auto.Tools script to add text to a custom field. I intend to batch movies in a series using a custom field named Series. I'd also like to order the movies in the series as well using a custom field I've named SeriesNumber.

I tried a couple of changes to the script, but they have been unsuccessful. I am confused by the help file in terms of calling to the custom field.

Any suggestions?
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

To set a custom field you use SetCustomField which works like SetField except that you have to pass the field identified between single quotes (as a text string), since it is not a predefined value known by the script engine.
revjoeyreed
Posts: 5
Joined: 2017-11-13 21:09:46

Post by revjoeyreed »

I tried this, but got a duplicate identifier error. I'm afraid this scripting thing is beyond me.

Code: Select all

function promptField() : Integer;
var
   Field: String;
   SetCustomField ('Series');
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

It takes two parameters: the field name and the field value
revjoeyreed
Posts: 5
Joined: 2017-11-13 21:09:46

Post by revjoeyreed »

My mistake. I thought the value was supplied later in the script when the PickTreeAdd was invoked.

I think I'll leave the scripting to those who understand it better than I do.

Thank you for the information. :)
Post Reply