LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-12-2008, 11:13 PM   #1
LinuxNewbie999
Member
 
Registered: Oct 2006
Distribution: FreeBSD
Posts: 162

Rep: Reputation: 30
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
 
Old 07-13-2008, 12:51 AM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
Quote:
Originally Posted by LinuxNewbie999 View Post
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.
 
Old 07-13-2008, 12:58 AM   #3
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script using zenity sandsterother Programming 1 02-14-2008 01:16 AM
GUI programming unixbrain Programming 10 09-28-2003 03:10 AM
C++ GUI programming oulevon Programming 8 05-14-2001 01:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration