Advertisement
jsbsan

Argumentos:para mostrar formularios o no

Jul 18th, 2013
1,017
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.56 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement