yab | yet another Basic for HAIKU
BeInput - Printable Version

+- yab | yet another Basic for HAIKU (http://yab.orgfree.com/forum)
+-- Forum: Programming in yab (http://yab.orgfree.com/forum/forumdisplay.php?fid=1)
+--- Forum: Snippets (http://yab.orgfree.com/forum/forumdisplay.php?fid=3)
+--- Thread: BeInput (/showthread.php?tid=30)



BeInput - clasqm - 08-06-2015

Found this among a bunch of old downloads

# BeInput 1.0
# Tanausu Gomez Garcia (_-Caleb-_)
# tanausugomez@gmail.com

BeInput is like a terminal's read command but in graphic mode.
Util for Script Writers.

Yab for haiku is still unstable.
Sometimes the program crash on startup.

Usage: BeInput User Label (Max 33 char. (yet))

Code:
# BeInput 1.0 (C)
# Tanausu Gomez Garcia (_-Caleb-_)
# tanausugomez@gmail.com

# Comando Peek para usar argumentos
while (peek("argument"))

perso$=peek$("argument")
perso1$=peek$("argument")
perso2$=peek$("argument")
perso3$=peek$("argument")
perso4$=peek$("argument")
perso5$=peek$("argument")
perso6$=peek$("argument")
perso7$=peek$("argument")
perso8$=peek$("argument")
perso9$=peek$("argument")
perso10$=peek$("argument")

wend

# La ventana del programa"
window open 300,300 to 580,380, "View", "BeInput"
view 0,10 to 550,450, "View1", "View"
draw text 20,10, perso$ +" " + perso1$ +" " + perso2$ +" " + perso3$ +" " + perso4$ +" " + perso5$ +" " + perso6$ +" " + perso7$ +" " + perso8$ +" " + perso9$ +" " + perso10$, "View1"
button 80,40 to 200,60, "oki", "Ok", "View1"
textcontrol 10,15 to 270,180, "Datos", "", "","View1"

inloop = true
while(inloop)
msg$=message$
switch msg$

case "View:_QuitRequested|"
        window close "View"
        end
     break

     case "oki|"
    Datos$=textcontrol get$ "Datos"
    output$=system$("echo "+Datos$+"")
        print output$
            window close "View"
            end
     break
        
end switch
wend
end



Free Web Hosting