gmessage script example


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.