Page 1 of 1
Editing custom fields from a script?
Posted: 2025-04-06 00:43:23
by fluxtion2
Hi,
I'm trying to make versions of some of the scripts that are more friendly for use with TV series and episodes. I could hijack a lesser-used default field like Composer and then pretend that it's e.g. the series title but that would be a very ugly, hacky way of doing things and prone to errors (and being overwritten). The cleanest way seems to be to use custom fields.
Is there any way to set custom fields within a script using SetField() or some other function?
Thanks for the excellent program. It's one of the strangest pieces of software I've used but it's also by far the most powerful, colourful, and closest to meeting most of my requirements from the dozens of alternatives I tested. It takes a lot of familiarisation and the keyboard shortcuts are the craziest I've ever seen! But I think I'm learning the workflow. I'd like to see some additional customisation options and I still can't figure out - for the life of me - what Extras are intended to be used for. (If anyone has a good exemplary use case of Extras, I'd love to see it!)
Cheers and merci,
fluxtion
Re: Editing custom fields from a script?
Posted: 2025-04-09 05:35:43
by antp
Hi,
Thanks

Sorry for the delay, I check the forum only once every few days.
Indeed using a custom field is probably the best solution, the user can then create a custom field with the appropriate tag (the script could rely on a parameter for that tag, so the user could change it).
There is a "SetCustomField" function to set the custom field value.
You can find it in the help file (Technical info -> script files creation) as well as other functions related to custom fields.
Re: Editing custom fields from a script?
Posted: 2025-04-10 15:52:19
by fluxtion2
antp wrote: 2025-04-09 05:35:43
Hi,
Thanks

Sorry for the delay, I check the forum only once every few days.
Indeed using a custom field is probably the best solution, the user can then create a custom field with the appropriate tag (the script could rely on a parameter for that tag, so the user could change it).
There is a "SetCustomField" function to set the custom field value.
You can find it in the help file (Technical info -> script files creation) as well as other functions related to custom fields.
That's helpful, thanks!
I suggest you make it obvious on the homepage of AMC that the documentation/help is in the app itself. I didn't realise this at first, because I'm used to online/web docs, so I only found the full docs in Help after many hours with the program. I was getting frustrated that such a powerful and advanced tool (with a full scripting setup and HTML templating features) didn't have proper documentation. It does but it's just not obvious to a modern user where to find it. At the very least, the CHM should be available as a separate download on the website. Some people, myself included, like to read parts of the docs before committing to installing a program.
Most modern users (who weren't brought up with old school software like this) don't know/expect to look for offline docs built into the program under Help. They expect HTML docs on the project website. If you want to modernise the homepage/website, there are several very easy ways to convert the CHM to a webpage bundle, including Microsoft's own HH.exe with the --decompile flag. It can also be converted to epub and even a .HTML bundle (IIRC) in Calibre (or the epub can be easily converted to a set of HTML files with e.g. pandoc). CHM is very 2000s. Many younger users don't even know what a CHM file is anymore. As I recall it, people stopped distributing ebooks as CHMs in the late '00s/early '10s because CHM wasn't easily portable and HH.exe didn't have the features people were starting to expect from their e-reader apps/hardware (e.g. favourites/bookmarks).
(Sidenote: I personally always liked using the CHM format on Windows with the native reader, especially for ebooks. It's very easy to see why it was such a popular ebook format in the '90s and '00s: Adobe Reader was annoying and not very powerful and there weren't many alternatives; PDF's OCR capacities and abilities to be copied or highlighted were just awful (often still are); PDFs were much, much bigger in filesize at a time when 500KB vs 5MB was a significant difference; and HH.exe was built right into Windows where it was guaranteed to be available on any user's machine. But CHM's era is over and I accepted that a long time ago. I'll always have fond memories of learning to program in C++ and PHP using CHM ebooks but HH.exe is extremely dated and CHM's needlessly complex proprietary binary format is a .doc style nightmare, especially compared to epub's use of entirely open technologies. On Windows, CHM is bad for security. On Linux, CHM is particularly horrible for WINE users. This sidenote has almost nothing to do with AMC. I just got nostalgic about seeing a CHM file for programming again.)
Re: Editing custom fields from a script?
Posted: 2025-04-13 12:14:58
by antp
Indeed, the inclusion of help documents is more something from 20 years ago (but the program is even older than that).
I could easily publish on my site the HTML files used by the CHM, I'll put that on my to-do list
