Script para rellenar campos código, tipo y tamaño

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
DarthPeacemaker
Posts: 19
Joined: 2007-05-05 12:53:59

Script para rellenar campos código, tipo y tamaño

Post by DarthPeacemaker »

Me he hecho este script para ayudarme en la introducción de valores de algunos campos, cuando importo películas a mano.

El programa:
-Copia el campo título original al campo título traducido
-Muestra el valor del tamaño del archivo y nos pide confirmación para añadirle "MB" al final
-Muestra un cuadro de diálogo para añadir el código del soporte para cada archivo
-Muestra un cuadro de diálogo para escoger el tipo del soporte para cada archivo

(***************************************************

Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/

[Infos]
Authors=DarthPeacemaker
Title=Rellenar campos
Description=Muestra el valor del tamaño de la película y nos pide confirmación para

añadirle la extensión MB. Copia el campo título original al campo título traducido. Permite

introducir el código y el tipo del soporte para una película determinada mediante un cuadro

de diálogo
Site=
Language=ES
Version=
Requires=3.5.0
Comments=
License=
GetInfo=0

[Options]

***************************************************)

program RellenarCampos;

var
CodigoDelSoporte: string;
TipoDeSoporte: string;

begin
//TranslatedTitle:
if GetField(fieldTranslatedTitle) = '' then
SetField(fieldTranslatedTitle, GetField(fieldOriginalTitle));
//Size
if ShowConfirmation('Quieres cambiar el tamaño de la peli de ' + GetField(fieldSize) +' a ' + GetField(fieldSize) + ' MB')=true then SetField(fieldSize, GetField(fieldSize)+ ' MB');
//Media
Input(GetField(fieldTranslatedTitle), 'Código del soporte', CodigoDelSoporte)
SetField(fieldMedia, CodigoDelSoporte);
//Media Type
PickListClear;
PickListAdd('Película');
PickListAdd('Serie');
PickListAdd('Documental');
PickListAdd('Anime');
PickListAdd('Animación');
PickListAdd('Imágenes');
PickListAdd('Música');
PickListAdd('MP3');
PickListAdd('Cómic');
PickListExec('Selecciona el tipo de soporte para ' + GetField(fieldTranslatedTitle),

TipoDeSoporte);
if GetField(fieldMediaType) = '' then
SetField(fieldMediaType, TipoDeSoporte);
PickListClear;
end.
Os lo dejo por si a alguien le interesa.

English version

The script:
- Copy the field original title to the field translated title
- Show the value of file size of the file and requests confirmation to add to it the extension "MB”
- Show a text box to add support code for each file
- Show a windows to choose support type for each file

(***************************************************

Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/

[Infos]
Authors=DarthPeacemaker
Title=Input Some Fields (Code; Type, Size)
Description=shows the value of the file size and prompt for confirmation to add to it extension "MB". Copy the field original title to the field translated title. It allows to introduce the code and the type of the support for a film determined by a dialogue box
Site=
Language=EN
Version=
Requires=3.5.0
Comments=
License=
GetInfo=0

[Options]

***************************************************)

program InputFields;

var
SuportCode: string;
TipoDeSoporte: string;

begin
//TranslatedTitle:
if GetField(fieldTranslatedTitle) = '' then
SetField(fieldTranslatedTitle, GetField(fieldOriginalTitle));
//Size
if ShowConfirmation('Do you want to change the file size from ' + GetField(fieldSize) +' to ' + GetField(fieldSize) + ' MB')=true then SetField(fieldSize, GetField(fieldSize)+ ' MB');
//Media
Input(GetField(fieldTranslatedTitle), 'Support Code', SuportCode)
SetField(fieldMedia, SuportCode);
//Media Type
PickListClear;
PickListAdd('Movie');
PickListAdd('TVShow');
PickListAdd('Documentary');
PickListAdd('Anime');
PickListAdd('Image');
PickListAdd('Music');
PickListAdd('MP3');
PickListAdd('Comic');
PickListAdd('File');
PickListExec('Select support code for ' + GetField(fieldTranslatedTitle), TipoDeSoporte);
if GetField(fieldMediaType) = '' then
SetField(fieldMediaType, TipoDeSoporte);
PickListClear;
end.
Last edited by DarthPeacemaker on 2007-05-13 08:52:34, edited 5 times in total.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Simply use the constants "fieldOriginalTitle" or "fieldTranslatedTitle".

Example :

Code: Select all

Input('Código', '"' + GetField(fieldOriginalTitle) + '" - Código del soporte', CodigoDelSoporte)
... 
PickListExec('"' + GetField(fieldOriginalTitle) + '" - Selecciona el tipo de soporte', TipoDeSoporte);
Greetings ;)
DarthPeacemaker
Posts: 19
Joined: 2007-05-05 12:53:59

Post by DarthPeacemaker »

Many thanks. :grinking:
Just now I was trying it....
DarthPeacemaker
Posts: 19
Joined: 2007-05-05 12:53:59

Post by DarthPeacemaker »

versión modificada del script para rellenar algunos campos en el primer post, por si a alguien le interesa.
Gracias a bad4u por la ayuda
Post Reply