[HOWTO]Expanding AMC scripts. Running a .NET/Java inside AMC

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
morfius
Posts: 26
Joined: 2011-11-10 13:01:06

[HOWTO]Expanding AMC scripts. Running a .NET/Java inside AMC

Post by morfius »

AMC is wonderful. A software fifteen years old still serving the function of cataloging as few, but, let face, the script editor is very limited:
Debug, IntelliSense, UTF8, and advanced programming features are missing.
So, How continue build on its features, especially as it relates to Script Implementation?

Here is a little explanation.

What is needed to complete the fields for each movie? A list of values like this:
Field1 = Value1
Field2 = Value2

Within a script, necessary functions and procedures are implemented for this purpose. First you need to find the source of this information and then download and sort it.
Long and tedious for the developer, which normally does not have a proper development environment (IDE), especially for those who have no knowledge of Pascal process.
This is the heart of the script.

But, If we have an external program that can provide that information?
We just need a way of exchange information's. Here i propose three examples:

simple text file Practical implementation is available here
local web server, as a gateway Practical implementation is available here
the simplest way of Windows exchange information's: COM, but at this time, I don't know if AMC has this possibility (Practical implementation is NOT available here)

The total number of return's lines shows information's type: (just a samples)
single line -> version of the program
two lines -> handled error, the second line contains error's description.
forty five lines -> fields and values.

Then, simply assign each return value to an specific field
SetField (Filed1, Value1);
SetField (Filed2, Value2);

Thus, the heart of the script can be developed in other language, like Java, C ++, VB, etc. within a modern development environment (IDE) and adding third-party solutions.
Even you can use other scripts from similar programs, like MoviePortal, XBMC, etc. And of course with UTF8 native support!

PROCESS FLOW CHART

Image

These examples have been developed in C# using SharpDevelop and Visual Studio Express (both free)

A more complex implementation (APIFilmAffinityIMDb) is available here (LocalWebServer) and here (TextFile)
That's all!
Greetings from Spain, and... long life to AMC

P.S. This is not a discussion about Pascal and other programming languages. Just other choice.
Post Reply