[RESOLVED] [FR] ImportXML

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
tuck
Posts: 4
Joined: 2009-03-02 14:34:52

[RESOLVED] [FR] ImportXML

Post by tuck »

Bonjour à tous,

Je souhaite mettre à jour mon catalogue au moyen du script ImportXML à partir d'un catalogue XML (édité à partir de AMC, récupéré sur un autre PC). Le problème est que j'obtiens l'erreur : "Erreur de script dans "XMLIMPORT" : class is not created à la ligne 29".

Quelles sont les solutions possibles ? Y a-t-il un autre moyen ?

Merci d'avance. Un grand merci à Antoine pour son fabuleux logiciel, ainsi qu'aux concepteurs des scripts.

Tuck
Last edited by tuck on 2009-03-02 23:57:16, edited 1 time in total.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

This happens if field "Original Title" on imported catalog is empty for some/all movies you try to import (error on line 29 = original title / line 28 = translated title). You have to fill these fields before you can use the script. Maybe it works if you outcomment line 29 (add two slashes // on the beginning of the line, but script might fail if this variable should be needed somewhere else - didn't test it).
tuck
Posts: 4
Joined: 2009-03-02 14:34:52

Post by tuck »

Hello,

In first, sorry about my bad English.

Thanks a lot for your answer ; I try (with a complete fields) and now the script works very well.

Tuck
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

If you have more movies with empty original title field you can use a small script to fill these :

Code: Select all

program NewScript;
begin
  if getField(fieldOriginalTitle) = '' then
    setField(fieldOriginalTitle, getField(fieldTranslatedTitle));
end.
The script checks for empty original title field, if so it copies translated title to field original title.
tuck
Posts: 4
Joined: 2009-03-02 14:34:52

Post by tuck »

Hello Bad4u,

Thanks again for your little script ; I used it ant it was exactly what I need.

Tuck
Post Reply