[17 Aug 2010] Rename instruction and SaveBrush

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

[17 Aug 2010] Rename instruction and SaveBrush

Post by Juan Carlos »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 17 Aug 2010 18:46:55 +0000 (GMT)

Hello friend Andreas:

Thank you for your answer here I send the code:

Code: Select all

/**** FUNCIÓN RENOMBRAR UN GRÁFICO ****/
Function p_RenombrarGrafico()

  GraficoCo$=FileRequest("Elige un gráfico a renombrar","jpg|png|bmp")

  If GraficoCo$=""

     SystemRequest("Aviso","No has elegido gráfico","OK",#REQICON_ERROR)

  Else

    FicheroRenombrar$=FilePart(GraficoCo$) ;Para extraer el nombre del gráfico desde la ruta-grafico-extensión.
    DecideRenombrar=SystemRequest("Última Aviso","Estas seguro de querer renombrar el gráfico "..FicheroRenombrar$,"Si|No",#REQICON_QUESTION)

    Switch DecideRenombrar
    Case 1:

      NuevoNombre$=StringRequest("Renombrar gráfico","Introduzca nuevo nombre, por favor".."\nEl viejo era:\n"..FicheroRenombrar$,"",#ALL,0,FALSE)
      If NuevoNombre$=""

        SystemRequest("Aviso Importante","Nombre vacio, sin caracteres","Vale|OK")

      Else

        Rename(GraficoCo$,NuevoNombre$)
        SystemRequest("Hecho","Acabas de renombrar:".."\n"..FicheroRenombrar$.."\n".."A".."\n"..NuevoNombre$,"Vale",#REQICON_INFORMATION)
      EndIf

    Case 0:
      SystemRequest("Salvado","No has renombrado el "..FicheroRenombrar$,"Vale",#REQICON_INFORMATION)

    EndSwitch

  EndIf

EndFunction
Well, also I have problems with the SaveBrush(30, Nombre$,FormaGrafico) where Nombre$ is the name of file and FormaGrafico the format output file jpg, lbm, etc. I only got that my current little tool save the picture in BMP not in #IMGFMT_JPEG but although only saves in BMP with DM2 and the LoadBrush instruction this BMP picture isn't recognize for it and my program, which is the problem, I use the WarpDTypes I have problem to save pictures using these DataTypes?

Best regards and thank you for your time and help.
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[06 Sep 2010] Re: Rename instruction and SaveBrush

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 06 Sep 2010 20:32:03 +0200
Hello friend Andreas:

Thank you for your answer here I send the code:
Sorry, that's too much code for me to comprehend. I need much smaller excerpts to say something about it :)
Well, also I have problems with the SaveBrush(30, Nombre$,FormaGrafico) where Nombre$ is the name of file and FormaGrafico the format output file jpg, lbm, etc. I only got that my current little tool save the picture in BMP not in #IMGFMT_JPEG but although only saves in BMP with DM2 and the LoadBrush instruction this BMP picture isn't recognize for it and my program, which is the problem,
You mean that you saved a BMP picture using SaveBrush() and that picture was corrupted? If that is the case, please send me the picture so that I can see what's wrong there.
I use the WarpDTypes I have problem to save pictures using these DataTypes?
Hollywood doesn't use DataTypes for saving. It's all custom code. DataTypes are only used for loading pictures.
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

[08 Sep 2010] Re: Rename instruction and SaveBrush

Post by Juan Carlos »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 8 Sep 2010 09:32:54 +0000 (GMT)

Hello Andreas:

Thank you for your answer, already I have resolved the problem.

Best regards, Juan Carlos.
Locked