Create new field

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
emueyes
Posts: 11
Joined: 2017-05-21 02:34:03

Create new field

Post by emueyes »

Hi

I'm new to scripting and need a bit of a push. I use the IMDB script for pulling metadata and would like to modify it slightly. In brief I want to create and populate a new field.

I have noticed that the IMDB trailers can be found at

http://www.imdb.com/title/ttnnnnnnn/

where ttnnnnnnn is the IMDB UID for the movie. I also notice in the IMDB script that the movie URL is created around the lines

Code: Select all

  MovieURL := 'http://imdb.com/title/tt' + MovieNumber;
  // URL
  if CanSetField(fieldURL) then
    SetField(fieldURL, MovieURL);
in the IMDB script. So.. I can easily cat together a URL for the trailer it seems, the movie UID is there already for me and I can just create a string with the required pieces.

My question is, then what? I need to assign the created trailer URL to a variable that I can get to from the reporting markup pages. Do I just make one up?

I see also there's a script that uses Youtube trailers so there's a choice I guess. Bit by bit though I'd like to learn more about AMC hopefully without driving you guys nuts with my questions.

Many thanks
emu
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

that URL is the "global" page of a movie on IMDb, not a direct link to the trailer
emueyes
Posts: 11
Joined: 2017-05-21 02:34:03

Post by emueyes »

OK, so I'm looking at it the other way now., in the multi page report output, I'm trying to take the field $$ITEM_URL and make it an actual HTML link in the report output. I've done my best to quote things, but am ending up with what looks like something local to the script ie

'<a href="'$$ITEM_URL'">IMDB</a>'

is output as

file:///T:/'http://imdb.com/title/tt4238858'

Not too bad, except for the absolute path onto my local drive. The link doesn't work because the reference to file:\\\T:\ is there.

What I'm after is an actual link to the IMDB page in the report.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Remove the single quotes, there are too many quotes there
emueyes
Posts: 11
Joined: 2017-05-21 02:34:03

Post by emueyes »

That worked, thanks.
Post Reply