Page 1 of 1

Using Auto.Tools Script to Batch Edit Custom Fields

Posted: 2017-11-14 18:27:02
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?

Posted: 2017-11-14 18:50:41
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.

Posted: 2017-11-14 19:51:38
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');

Posted: 2017-11-14 20:23:46
by antp
It takes two parameters: the field name and the field value

Posted: 2017-11-14 20:26:38
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. :)