[17 Aug 2010] Rename instruction and SaveBrush
Posted: Sat Jun 13, 2020 5:32 pm
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:
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.
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
Best regards and thank you for your time and help.