Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog
3 juillet 2012 2 03 /07 /juillet /2012 12:11

 

 

Zenity is just a great program for doing quickly a Graphical User Interface on Linux.

 

I am sure you can understand the following program, which asks if you want to increase or decrease,

and runs "./increase" or "./decrease" accordingly:

 

===========================================

 

#!/bin/bash

 

while [ true ]

do

#uses zenity to ask first.

zenity --question --title "Difficult level" --text "Increase ?" --ok-label="Increase" --cancel-label="Decrease"

if [ "$?" -eq "0" ]

then

./increase

else

./decrease

fi


done

===========================================
Isn't it easy ? The loop is here so that the user can call increase or decrease many times...
zenity.jpeg
And you get this =======================>
and a great tutorial:
Partager cet article
Repost0

commentaires

T
Bonjour,<br /> Mais ou est le panda ?<br /> Je l'ai trouvé dans #!/bin/bash<br /> Cordialement
Répondre
L
Good post !!Maybe in time I will consider having this as my blogging platform. Even though lots of people saying this platform is hard to handle.
Répondre
L
blog trés intéressant
Répondre