Advertisement
Guest User

Untitled

a guest
Nov 13th, 2010
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.15 KB | None | 0 0
  1. #!/bin/sh
  2. #Affichage "Graphique"
  3.  
  4. tmp=/tmp/choix$$
  5. dialog  --backtitle "afficher la date plus tard" \
  6.         --title "TITRE" \
  7.         --msgbox "Texte Intro\nblablabla\nblablab\n\n Press <Enter> to continue..." 10 45 \
  8. secu1=1
  9. while [ $secu1=1 ]
  10. do
  11. dialog --menu "menu" 20 20 20 1 Menu1 2 Menu2 3 Menu3 4 MenuPrincpal 5 Quitter 2>$tmp \
  12.         choix=$(cat $tmp);
  13.  
  14.         if [$choix=1]
  15.         then
  16.                 echo $choix
  17.                 dialog --msgbox "Catégorie Menu 1" 10 45 \
  18.                        --clear \
  19.         elif [$choix=2]
  20.         then
  21.                 dialog --msgbox "Catégorie Menu 2" 10 45 \
  22.                        --clear \
  23.         elif [$choix=3]
  24.         then
  25.                 dialog --msgbox "Catégorie Menu 3" 10 45 \
  26.                        --clear \
  27.         elif [$choix=4]
  28.         then
  29.                 dialog --msgbox "Revenir au menu principal " 10 45 \
  30.                        --clear \
  31.                 secu1=0
  32.         elif [$choix=5]
  33.         then
  34.                 dialog --msgbox "Quitter le programme" 10 45 \
  35.                        --clear \
  36.          else
  37.            echo "not a choice"
  38.         fi
  39. done
  40. ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement