Queria saber si puedo abrir una imagen que tengo guardada en el ordenador (.png) y escribir en un lateral de la imagen una serie de variables... He intentado hacer algo de GDI+ pero no me ha servido... Aquí os dejo lo que he intentado...
Código: Seleccionar todo
$espera = 6*60000
$anyo = @YEAR
$mes = @MON
$dia = @MDAY
$hora = 0
$minute = "00"
$sFileName = "C:\Users\marc\Desktop\CurrentCDV\CDV_Current_PPI.png"
$hImage = _GDIPlus_ImageLoadFromFile($sFileName)
$hGraphics = _GDIPlus_ImageGetGraphicsContext ($hImage)
$sString = $anyo & "-" & StringFormat("%02d",$mes) & "-" & StringFormat("%02d",$dia) & " " & StringFormat("%02d",$hora) & ":" & $minutes
$nX = 5
$nY = 5
_GDIPlus_GraphicsDrawString($hGraphics, $sString, $nX, $nY[, $sFont = "Arial"[, $fSize = 10[, $iFormat = 0]]])
sleep ($espera)
Una vez genero el .exe y lo ejecuto me aparece el mensaje de error
Line 3054 (File "C/......exe")
Error: Variable used without being declared
Haber si alguien me dice si lo que pretendo se puede hacer y si se puede, que es lo que hago mal...