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
Editing custom fields from a script?
Re: Editing custom fields from a script?
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.
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?
That's helpful, thanks!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.

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?
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
I could easily publish on my site the HTML files used by the CHM, I'll put that on my to-do list

Re: Editing custom fields from a script?
Sounds good -- thanks! Yeah, it's a fun trip down memory lane for me - it took me right back to the late '90s when I was 12 and teaching myself C++ using pirated CHM ebooks[1] - but that's not the case for most modern users. Most people born after about 1998 don't know what a CHM is! You don't have to put a lot of effort into it. I know that documentation is the most annoying/boring part of development. You can just upload the CHM separately and briefly explain what it is and that Windows will open it automatically. And also that WINE users can open it in Sumatra. That would be enough to stop people like me getting confused and thinking there is no docs.antp wrote: 2025-04-13 12:14:58 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![]()
There are problems with that approach, however. Modern browsers/OSs don't like CHM downloads and the CHM contents are kinda outdated. The Index is missing entirely (which may make some people think the entire CHM is broken) and, at least for me, all the icons are missing. For example:

It's not a huge problem. All the most important info is in the text, but it could be confusing for absolute novices. There may be an issue with the customisable icon sets but most people don't customise their icons until they understand a program. And even dynamic documentation online wouldn't solve that problem anyway. So, yeah, I guess uploading the CHM is a low priority yet very easy option. But ideally the HTML files would be improved to remove the errors, which is a more involved task.
I greatly admire how long you and the other developers have managed to keep AMC alive. 25 years is a huge achievement for any open source project, let alone to still be relevant after all that time. It's a milestone that <0.01% of projects ever reach. I'd be interested to see what your todo list looks like, to see if there's anything I can help with. At the same time, I'm suffering from a severe chronic illness that greatly limits my energy levels, so I could only do rather basic stuff. Also, as great as AMC is, I despise Pascal. For me, it's absolutely top 3 worst programming languages I've ever used (and I've used over 20), so I'm not hugely practiced in it. I also don't have any version of Delphi (their C++Builder is pretty great though). I've only ever used OpenPascal and Lazarus.
By the way, I've figured out that I can make AMC compatible with both entire TV show listings AND individual episode listings without breaking ANY existing functionality by adding only one new core field: Series. This could also be used by regular film users to group e.g. all the Star Wars movies under one series. I want to make this part of the core functionality of vanilla AMC. I've tested it as a custom field and it works excellently. Presumably, however, if I want it as a native field (e.g. sort, grouping, edit form, title formats), that means adding it into the main branch source code and recompiling the whole thingh? If I do it, would you add the change to the mainline release? Frankly, I think most people expect apps like AMC to also be compatible with series. Cinelog for Android, for example, accepts both movies and series, despite its title. So I think it's a change most people would welcome and nobody would object to. (It'd be super-helpful if you could send over an archive of all the project files, third-party libraries, source code etc. in a ready-to-compile format. If so, I'll acquire Delphi 7.)
Best wishes, mate. Sorry for the long post but I had a lot to communicate!
[1] I couldn't afford £40 books at that age.

Re: Editing custom fields from a script?
Oh right, shit, I just tried to open the help file outside of AMC and I get an error saying "Help is no longer supported in Windows 10 or later". Okay, that's an issue. It may also explain why I'm having problems with the help file. Weirdly, when | open English.chm directly, the Index page loads fine. The icons are still broken though.
I also just realised that AMC uses the even older HLP format in a sort of hybrid with CHM. Unfortunately, that means a trickier conversion (for the other languages) and you can't just upload a .HLP file to the main page. Even Sumatra and the MuPDF engine don't support HLP anymore (IIRC).
I'll look into it some more and see if I can transform at least the English and French versions.
I also just realised that AMC uses the even older HLP format in a sort of hybrid with CHM. Unfortunately, that means a trickier conversion (for the other languages) and you can't just upload a .HLP file to the main page. Even Sumatra and the MuPDF engine don't support HLP anymore (IIRC).
I'll look into it some more and see if I can transform at least the English and French versions.
Re: Editing custom fields from a script?
If changes to the code are submitted, I could indeed include them officially.
The annoying part of making changes in the program, in addition to update the documentation, is that all translations also have to be updated.
So all what impacts the GUI (including fields) are implying some work as you see...
If you are not familiar with Delphi, compiling AMC will not be so easy. There are many dependencies with components to install, I would not recommend it for people that are new to it
Is an additional field really needed for what you want?
The "Media Label" field could be used for this kind of things. It was originally added for this kind of custom user-classification.
The .HLP file is the help of the report designer, a module that I use (included in AMC, made by a 3rd-party). Indeed it is not supported in Windows 10. I wonder why Microsoft completely ditched that, it must not be so difficult to keep just for compatibility with old software.
The CHM still more or less works for now, but indeed I should maybe simply switch to standard HTML pages.
I could include icons in the CSS (to reduce the number of files), and maybe even try to put all the content in one big file with a javascript navigation menu. I guess things must exist for that.
The annoying part of making changes in the program, in addition to update the documentation, is that all translations also have to be updated.
So all what impacts the GUI (including fields) are implying some work as you see...
If you are not familiar with Delphi, compiling AMC will not be so easy. There are many dependencies with components to install, I would not recommend it for people that are new to it

Is an additional field really needed for what you want?
The "Media Label" field could be used for this kind of things. It was originally added for this kind of custom user-classification.
The .HLP file is the help of the report designer, a module that I use (included in AMC, made by a 3rd-party). Indeed it is not supported in Windows 10. I wonder why Microsoft completely ditched that, it must not be so difficult to keep just for compatibility with old software.
The CHM still more or less works for now, but indeed I should maybe simply switch to standard HTML pages.
I could include icons in the CSS (to reduce the number of files), and maybe even try to put all the content in one big file with a javascript navigation menu. I guess things must exist for that.
-
- Posts: 767
- Joined: 2007-04-28 05:46:43
- Location: Italy
Re: Editing custom fields from a script?
Hoping to be helpful, I sent Antoine two pdf versions of the Help file.
I hope this was helpful, let me know.
I hope this was helpful, let me know.

Re: Editing custom fields from a script?
It could indeed be a possibility to use PDF instead of CHM for that.
What tool did you use to generate that?
It has a few drawbacks though. I think that simple HTML files may still be easier to use, with a proper menu (replicating the menu from the CHM).
What tool did you use to generate that?
It has a few drawbacks though. I think that simple HTML files may still be easier to use, with a proper menu (replicating the menu from the CHM).
-
- Posts: 767
- Joined: 2007-04-28 05:46:43
- Location: Italy
Re: Editing custom fields from a script?
I used a simple virtual pdf printer (and merged the various chapters). However, it seems to me that the internal links of the pdf work and that the file can be inspected to search for keywords.antp wrote: 2025-05-12 14:19:05 What tool did you use to generate that?
It has a few drawbacks though. I think that simple HTML files may still be easier to use, with a proper menu (replicating the menu from the CHM).
What I can't do is convert fruser.hlp, even though I have a PC with Windows XP.
