Source language: Translate to:

Help with this code

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Help with this code

Postby Eduardo Volpi » Tue Aug 10, 2010 7:22 pm

Hi guys

I have installed the Neoresize plugin and i'm using the following code in my pub, but it doesn't work and I can't figure out what is wrong with it:

=============================================
FileOpenBox "Select Image File" "Arquivos de Imagem|*.bmp;*.gif;*.jpg;*.png" "" "[source_Img]" ""

If "[source_Img]" "<>" ""

SetVar "[new_width]" "339"
AE_Image_Get_Metrics "[source_Img]"
Math "[new_width]*[ae_Image_height]/[ae_Image_width]" "0" "[new_height]"
ae_resize "[source_Img]|[new_Img]|[new_width]|[new_height]"

SetVar "[Amigos.Amigos.Photo]" "[new_Img]"
EndIf
==============================================

Thanlks for helping

Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil

Postby David de Argentina » Tue Aug 10, 2010 8:52 pm

Hi Eduardo,

Wellcome to the Forum.

Your code works fine... except you does not define the [New_Img] Variable.

if you put this line:

Setvar "[New_Img]" "Foto.png"

and you obtain some like this:

Code: Select all
FileOpenBox "Select Image File" "Arquivos de Imagem|*.bmp;*.gif;*.jpg;*.png" "" "[source_Img]" ""

If "[source_Img]" "<>" ""

  SetVar "[new_width]" "339"
  Setvar "[New_Img]" "Foto.png"

  AE_Image_Get_Metrics "[source_Img]"

  Math "[new_width]*[ae_Image_height]/[ae_Image_width]" "0" "[new_height]"

  ae_resize "[source_Img]|[new_Img]|[new_width]|[new_height]"

  SetVar "[Amigos.Amigos.Photo]" "[new_Img]"

EndIf


the code works like a charm...

My devaluated cent,
David de Argentina
User avatar
David de Argentina
 
Posts: 1560
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby Eduardo Volpi » Wed Aug 11, 2010 3:00 pm

Hi David,

Thank you very much for your help. Now the code works. And thanks for developing such usefull plugins for us.

Saludos desde Brasil,

Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests

cron