Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.  
  2. Public Sub Main()
  3.  
  4.   If Application.Args[1] = "" Then    
  5.     'modo gráfico,ya que no se ha introducido ningun numero
  6.     FMain.Show()
  7.   Else
  8.     'generar imagen internamente...  
  9.    
  10.     If Len(Application.Args[1]) <> 13 Then
  11.       Print "Error: introduce un numero valido EAN-13 (" & Application.Args[1] & ")"
  12.       Quit
  13.     Else
  14.       'borro la imagen anterior si la hay.
  15.       Try Kill "/tmp/codigoBarras.png"
  16.       'genero imagen del codigo y la guardo en
  17.       imagen(Application.Args[1])
  18.       Quit
  19.      
  20.     Endif
  21.   Endif
  22.  
  23. End