Posted By

yuconner on 08/20/06


Tagged

linux message dialog


Versions (?)

gmessage script example


 / Published in: Bash
 

  1. #!/bin/sh
  2.  
  3. gmessage -center -title 'title' -geometry 600x100 "Content, select an option:" -buttons $(echo -e -n "OptionA:0,OptionB:1,OptionC:2,OptionD:3,OptionE:4,OptionF:5,OptionG:6,Abort:8" )
  4.  
  5. Res="$?"
  6.  
  7. if [ "$Res" = "8" ]; then exit 2; fi
  8.  
  9. if [ "$Res" = "0" ]; then `[do something]`;fi
  10. if [ "$Res" = "1" ]; then `[do something]`;fi
  11. if [ "$Res" = "2" ]; then `[do something]`;fi
  12. if [ "$Res" = "3" ]; then `[do something]`;fi
  13. if [ "$Res" = "4" ]; then `[do something]`;fi
  14. if [ "$Res" = "5" ]; then `[do something]`;fi
  15. if [ "$Res" = "6" ]; then `[do something]`;fi

Report this snippet  

You need to login to post a comment.