Sponsored Content
Full Discussion: Dialog forms
Homework and Emergencies Homework & Coursework Questions Dialog forms Post 302882117 by sasisken on Saturday 4th of January 2014 11:24:33 AM
Old 01-04-2014
Dialog forms

1. The problem statement, all variables and given/known data:
I need to create dialog interface for adress book i created a while ago but i don't know how to read info from forms

2. Relevant commands, code, scripts, algorithms:

#!/bin/bash
knyga="adresu-knyga.txt"

dialog --ok-label "Submit" \
--backtitle "Linux User Managment" \
--title "Useradd" \
--form "Create a new user" \
15 50 0 \
"Pavarde:" 1 1 "$pavarde" 1 10 10 0 \
"Vardas:" 2 1 "$vardas" 2 10 15 0 \
"Telefono numeris:" 3 1 "$tel" 3 10 8 0 \
"El.pastas:" 4 1 "$pastas" 4 10 40 0 \

echo "$vardas ; $tel ; $el" >>$knyga

this is what i have at this time but it only gives commas in text file dunno what to do not a lot of info on this topic

3. The attempts at a solution (include all code and scripts):

Code:
#!/bin/bash
knyga="adresu-knyga.txt"

           dialog --ok-label "Submit" \
          --backtitle "Linux User Managment" \
          --title "Useradd" \
          --form "Create a new user" \
                                        15 50 0 \
        "Pavarde:" 1 1  "$pavarde"      1 10 10 0 \
        "Vardas:"    2 1        "$vardas"       2 10 15 0 \
        "Telefono numeris:"    3 1      "$tel"          3 10 8 0 \
        "El.pastas:"     4 1    "$pastas"       4 10 40 0 \

                echo "$vardas ; $tel ; $el" >>$knyga




4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Lithuania , Vilnius , Vilniaus Collegue 1st course M.Liogys HTML Code:
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

int.lst forms

I am working on a re-engineering project. Original Code is written in C. In the C code some "forms" are being called. Each form is in a separate file and files are tagged "int" or "int.lst" like f00.int, f00.int.lst Can some body through some light on what are these files and what is the... (2 Replies)
Discussion started by: cxredd4
2 Replies

2. UNIX for Dummies Questions & Answers

Forms

Hi, I currently have a form containing three boxes of info to be filled in. I would like it so if the user presses F10 a list of company names is displayed, using the company names from a table I have. I would like this list to be in a popup window if it is possible. I am using Informix, sco-unix.... (2 Replies)
Discussion started by: Dan Rooney
2 Replies

3. UNIX for Dummies Questions & Answers

lp printing - forms design

This may seem a basic question however I'm using lp printing for the first time, is it possible to call a pre-defined form or template (the froms could for example contain Company details & logos) dependant on the type of file being sent to the print queue (e.g by using triggers) ? (0 Replies)
Discussion started by: gefa
0 Replies

4. Shell Programming and Scripting

Perl CGI forms

Hello All, I am calling a script 'abc.pl' in my action section while creating a form. This will automatically pass parameters that are collected in the form. But I want to pass other parameters which are actually just variables in the script I am calling 'abc.pl' from. How do I make sure these... (4 Replies)
Discussion started by: garric
4 Replies

5. UNIX for Dummies Questions & Answers

Unix Forms

Hi Im new so be gentle Just starting out in programing and i want to try unix to see what all the fuss is about. But right now im like a kid in a sweet shop, spoilt for choice. Theres red hat, fedora, linux, ubuntu and thats just for starters I've been told ubuntu is a nice... (3 Replies)
Discussion started by: NightWatchman
3 Replies

6. Shell Programming and Scripting

Unix / Linux Dialog Utility - how to open 2+ more dialog windows ?

Hi, example of Unix / Linux dialog utility is below. I am going to use dialog as simple GUI for testing of a modem. So I need to combine some dialog boxes into one. I need to have input box, output box, info box, dialog box, radiobox as in any standard program with graphical user... (2 Replies)
Discussion started by: jack2
2 Replies

7. Shell Programming and Scripting

Grabbing web forms with Perl

Hello Everyone, I've googled everywhere for this with no luck and my brain hurts. I'm trying to write a program to take my webpages and search for forms. I've used LWP::Simple to store a website in $content I need to cut the form out of $content. I don't know how to do this seeing as how... (2 Replies)
Discussion started by: wibbs
2 Replies

8. Shell Programming and Scripting

Dialog utility

Hi, I am new to shell scripting, started learning script before one month. I can't understand the below script. dialog --title "Inputbox - To take input from you" --backtitle "Linux Shell\ Script Tutorial" --inputbox "Enter your name please" 8 60 2>/tmp/input.$$ In this script they are... (1 Reply)
Discussion started by: raj1983
1 Replies
zenity(1)							   User Commands							 zenity(1)

NAME
zenity, gdialog - display simple GNOME dialogs SYNOPSIS
zenity --calendar [--height=height] [--title=title] [--width=width] [--window-icon=path] [--date-format=format] [--day=number] [--month=number] [--text=text] [--year=number] zenity --entry [--height=height] [--title=title] [--width=width] [--window-icon=path] [--entry-text=text] [--hide-text] [--text=text] zenity --error | --info | --question | --warning [--height=height] [--title=title] [--width=width] [--window-icon=path] [--text=text] zenity --file-selection [--height=height] [--title=title] [--width=width] [--window-icon=path] [--filename=path] [--multiple] [--separa- tor=character] zenity --list --column=text [--height=height] [--title=title] [--width=width] [--window-icon=path] [--checklist] [--editable] [--radiolist] [--separator=character] zenity --progress [--height=height] [--title=title] [--width=width] [--window-icon=path] [--auto-close] [--percentage=number] [--pulsate] [--text=text] zenity --text-info [--height=height] [--title=title] [--width=width] [--window-icon=path] [--editable] [--filename=path] zenity --about | --help | --usage | --version | -GTK+_options DESCRIPTION
The Zenity application displays simple GNOME dialogs. You can use Zenity to create scripts that interact graphically with the user. gdia- log(1) has been deprecated and is now a wrapper script around Zenity, and will preserve compatibility with older scripts. OPTIONS
Zenity supports several different types of options. Zenity-Specific Options The following Zenity-specific options are supported: --about Display the About Zenity dialog, which provides information about the Zenity application, including the version number and the author. --version Display the version number of Zenity. Help Options The following help options are supported: --help Display help text. You can also use -? to specify this option. --usage Display brief usage text. GTK+ Options Zenity supports the standard GTK+ options. For more information about the GTK+ options, execute the zenity -? command. Dialog Options The following dialog options are supported: --calendar Display a calendar dialog. --entry Display a text entry dialog. --error Display an error dialog. --file-selection Display a file-selection dialog. --info Display an informational dialog. --list Display a list dialog. --progress Display a progress indication dialog. --question Display a question dialog. --text-info Display a text information dialog. --warning Display a warning dialog. General Dialog Options The following general dialog options are supported: --height=height Set the dialog height. --title=title Set the dialog title. --width=width Set the dialog width. --window-icon=path Set the dialog window icon with a full path to an image. Calendar Dialog Options The following calendar dialog options are supported: --date-format=format Set the date format to return at the command line. The default format depends on your locale. The format must be of strftime style, for example %A %d/%m/%y. --day=number Set the calendar day. --month=number Set the calendar month. --text=text Set the dialog text. --year=number Set the calendar year. Text-Entry Dialog Options The following text-entry dialog options are supported: --entry-text=text Set the dialog entry text. --hide-text Use asterisks to hide the entry text. --text=text Set the dialog text. Error Dialog Options The following error dialog options are supported: --text=text Set the dialog text. File-Selection Dialog Options The following file-selection dialog options are supported: --filename=path Set the file or directory to select by default. --multiple Allow multiple selections. --separator=character Set the separator character to return at the command line. This option is used only when the dialog allows multi- ple selections. Informational Dialog Options The following informational dialog options are supported: --text=text Set the dialog text. List Dialog Options The following list dialog options are supported: --checklist Specify that the first column contains check boxes. --column=text Set the text of a column. --editable Specify that the dialog contents are editable. --radiolist Specify that the first column contains radio buttons. --separator=character Set the separator character to return at the command line. This option is used only when the dialog allows multi- ple selections. Progress-Indication Dialog Options The following progress-indication dialog options are supported: --auto-close Close the dialog automatically when 100% has been reached. --percentage=number Set the initial percentage of the progress bar. --pulsate Specify that the progress bar pulsates until an EOF character is read from the command line. --text=text Set the dialog text. Question Dialog Options The following question dialog options are supported: --text=text Set the dialog text. Text-Informational Dialog Options The following text-informational dialog options are supported: --editable Specify that the dialog contents are editable. --filename=path Set the file to display in the dialog. Warning Dialog Options The following warning dialog options are supported: --text=text Set the dialog text. EXAMPLES
Example 1: Launching Zenity Using the List Dialog example% zenity --list --title="Choose bugs you wish to view" --text="Select items from the list below." --column="Bug Number" --column="Severity" --column="Description" 992383 Normal "GtkTreeView crashes on multiple selections" 293823 High "GNOME Dictionary does not handle proxy" 393823 Critical "Menu editing does not work in GNOME 2.0" Example 2: Launching Zenity Using the Progress Dialog example% find . -name '*.bk' | zenity --progress --title="Finding backups" --pulsate Example 3: Launching Zenity Using the Text Informational Dialog example% zenity --text-info --title="LGPL License" --filename="/home/user1/LICENSE" ENVIRONMENT VARIABLES
The following environment variables affect the execution of zenity: ZENITY_OK, DIALOG_OK Set the return value for OK. ZENITY_CANCEL, DIALOG_CANCEL Set the return value for Cancel. ZENITY_ERROR, DIALOG_ERROR Set the return value for Error. ZENITY_ESC, DIALOG_ESC Set the return value for Escape. EXIT STATUS
The following exit values are returned: -1 Error 0 OK 1 Cancel, Escape FILES
The following files are used by this application: /usr/bin/zenity Executable for Zenity. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWzenity | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
Zenity Manual Latest version of the GNOME Desktop User Guide for your platform. NOTES
Written by Glynn Foster, Sun Microsystems Inc., 2003, 2004. SunOS 5.10 20 Jul 2004 zenity(1)
All times are GMT -4. The time now is 09:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy