LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   GUI shell programming with zenity (https://www.linuxquestions.org/questions/programming-9/gui-shell-programming-with-zenity-655397/)

LinuxNewbie999 07-12-2008 11:13 PM

GUI shell programming with zenity
 
It is possible to create a Calculator program using shell script with zenity?
Please provide some references since i cannot find much in man page. Thanks

Uncle_Theodore 07-13-2008 12:51 AM

Quote:

Originally Posted by LinuxNewbie999 (Post 3212718)
It is possible to create a Calculator program using shell script with zenity?
Please provide some references since i cannot find much in man page. Thanks

I think, it might be possible, but for a calculator program you're much better off using GTK, Qt or Tcl/Tk. Zenity is for small dialogs, not full-blown GUI applications.

rikijpn 07-13-2008 12:58 AM

http://linux.softpedia.com/progDownl...oad-30595.html <-This is a front-end for google's calculator.

Even if you didn't use this you could read the text typed in zenity, write it to a file or just put in into a variable, and then process it with a calculator program (like "bc"). So for example, you get zenity to read some text, put it into a variable, echo that variable into a file, then bc < that_file. Then put that result into another window. (Also you'd have to delete the temporary file)
So, everytime you want to calculate something you get a small window to put what to calculate, then another one telling you the result.


All times are GMT -5. The time now is 03:02 PM.