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
Dialog(3pm)						User Contributed Perl Documentation					       Dialog(3pm)

NAME
Tk::Dialog - Create modal dialog and wait for a response. SYNOPSIS
$dialog = $parent->Dialog(-option => value, ... ); DESCRIPTION
This procedure is part of the Tk script library - its arguments describe a dialog box. After creating a dialog box, Dialog waits for the user to select one of the Buttons either by clicking on the Button with the mouse or by typing return to invoke the default Button (if any). Then it returns the text string of the selected Button. While waiting for the user to respond, Dialog sets a local grab. This prevents the user from interacting with the application in any way except to invoke the dialog box. See the Show() method. OPTIONS
The following option/value pairs are supported: -title Text to appear in the window manager's title bar for the dialog. -text Message to appear in the top portion of the Dialog. -bitmap If non-empty, specifies a bitmap to display in the top portion of the Dialog, to the left of the text. If this is an empty string then no bitmap is displayed in the Dialog. -default_button Text label string of the Button that displays the default ring. -buttons A reference to a list of Button label strings. Each string specifies text to display in a Button, in order from left to right. METHODS
$answer = $dialog->Show(?-global?); This method displays the Dialog, waits for the user's response, and stores the text string of the selected Button in $answer. If -global is specified a global (rather than local) grab is performed. The actual Dialog is shown using the Popup method. Any other options supplied to Show are passed to Popup, and can be used to position the Dialog on the screen. Please read Tk::Popup for details. ADVERTISED WIDGETS
Because Tk::Dialog is a subclass of Tk::DialogBox it inherits all the advertised subwidgets of its superclass: e.g. "B_button-text", where 'button-text' is a Button's -text value. Additionally, Tk::Dialog advertises: message The dialog's Label widget containing the message text. bitmap The dialog's Label widget containing the bitmap image. EXAMPLE
$dialog = $mw->Dialog(-text => 'Save File?', -bitmap => 'question', -title => 'Save File Dialog', -default_button => 'Yes', -buttons => [qw/Yes No Cancel/); KEYWORDS
bitmap, dialog, modal, messageBox perl v5.14.2 2010-05-29 Dialog(3pm)
All times are GMT -4. The time now is 03:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy