Sponsored Content
Top Forums UNIX for Beginners Questions & Answers New to Linux, using zenity need some help Post 303034507 by papgizmet on Saturday 27th of April 2019 03:40:48 PM
Old 04-27-2019
New to Linux, using zenity need some help

Hello all,


I am using zenity for my final project in class and need some help. I am trying to create a text based game and in this game you pick up items, I want to store those items in a .txt file and be able to recall them later and remove a SPECIFIC item from the list after it has been used. Anyone know how I would go about doing something like that?


Also, how can I make it so if a user hits the F1 key, lets say, it brings up a specific menu (lets say a main menu where the user can save the game, load the game, something like that?


Thanks for any help you can give.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Zenity

Hi! does someone know how can I setup a zenity entry "box" such that comes with the data as default. like it appears an entry box already with the data but it can be modify. thanks (2 Replies)
Discussion started by: ruben.rodrigues
2 Replies

2. UNIX for Dummies Questions & Answers

zenity --question help

Hello I've a script where I've a zenity --question because I want to ask the user if he is sure that he wants to delete the file. The problem is, if the user says "OK" it deletes nad if the user says cancel it deletes :) How can I close the script if the user says cancel?? thanks (3 Replies)
Discussion started by: ruben.rodrigues
3 Replies

3. Shell Programming and Scripting

Zenity Menu

I have some troubles with zenity and menu. I seach for: MAIN MENU CHOICE 1 "do something" CHOICE 2 "do something 2" CHOICE 3 "do something 3" But then in "do someghing " when i click i want to return to the MAIN MENU So something like: while true; do ... (4 Replies)
Discussion started by: aspire
4 Replies

4. Shell Programming and Scripting

Zenity and IF/ELSE cond'.

Hey guys i wrote this code but it wont give me anything. any ideas? ans=$(zenity --list --text "Do you want to set USER/GROUP quota?" --radiolist --column "Choice" --column "Desc" TRUE Hi FALSE Bye); echo $ans if ; then ./example.sh else exit fi (2 Replies)
Discussion started by: dplate07
2 Replies

5. Shell Programming and Scripting

file zenity

Hello, I have a script with zenity file, but I want to know the file name and path, but this way I just take the name of the file. fl1=`zenity --file-selection --title="Seleccionar fichero"` basename $fl1 .txt > temp nom=`cat temp` Thank you very much (1 Reply)
Discussion started by: uri_crack
1 Replies

6. UNIX for Dummies Questions & Answers

using an array with zenity

I got an array: for i in $(fdisk -l | awk '/Disk\ \/dev\/d/ { print $2 }') ; do drive_list="$i" # echo "$i" ((index++)) done #>/dev/nullI got this zenity code: grub_dev=$(zenity --list --title="Hard Drives" --text="Choose exactly one drive to use for the GRUB bootloader.... (2 Replies)
Discussion started by: tornow
2 Replies

7. Linux

Zenity function

i wanted to put this code on a list zenity but it never worsk, how would i be able to do that? cd /home/mint ls -d */ (3 Replies)
Discussion started by: roozis
3 Replies

8. Shell Programming and Scripting

Zenity help

I have a large system housekeeping script, that I want to use with zenity. One of the processes will be to conduct a virus scan, which I can easily do with something like: clamscan -rv / | zenity --text-info --width 640 --height 640 The problem is that it needs user intervention by... (2 Replies)
Discussion started by: stumpyuk
2 Replies

9. Shell Programming and Scripting

Zenity, While, and Conditions

All, I'm having fighting a losing battle with what I though would be simple. My goal is this: Show a zenity progress or info dialog until the system obtains an ip address, then close the dialog and continue through the rest of the script. Right now I've got the following: ip=`ifconfig |... (2 Replies)
Discussion started by: timbrammer91091
2 Replies
MORIA(6)							   Games Manual 							  MORIA(6)

NAME
moria - a dungeon game SYNOPSIS
moria [ -o ] [ -r ] [ -s ] [ -S ] [ -n ] [ -w ] [ savefile ] DESCRIPTION
Moria plays a dungeon game with you. It lets you generate a character, lets you buy equipment, and lets you wander in a fathomless dungeon while finding treasure and being attacked by monsters and fellow adventurers. Typing ? gives you a list of commands. The ultimate object of moria is to kill the Balrog, which dwells on the 50th level of the dungeon, 2,500 feet underground. Most players never even reach the Balrog, and those that do seldom live to tell about it. For a more complete description of the game, read the document The Dungeons of Moria. By default, moria will save and restore games from a file called moria.save in your home directory. If the environment variable MORIA_SAV is defined, then moria will use that file name instead of the default. If MORIA_SAV is not a complete path name, then the savefile will be created or restored from the current directory. You can also explicitly specify a savefile on the command line. If you use the -n option, moria will create a new game, ignoring any savefile which may already exist. This works best when a savefile name is specified on the command line, as this will prevent moria from trying to overwrite the default savefile (if it exists) when you try to save your game. You move in various directions by pressing the numeric keypad keys, VMS-style. If you specify -r, you move the same way you do in rogue(6). You can also specify -o to force the VMS-style command set. These options will override defaults stored in the savefile. If these options are given multiple times, only the last one will take effect. If you specify -s, moria prints all of the scores in the score file and exits. On a multiuser system, if you specify -S, moria prints prints only those scores belonging to you and then exits. If you specify -w, moria will start up in wizard mode. You can resurrect a dead character by using this option when starting the game. Resurrected characters are teleported to the town level and given zero hitpoints. Wizard mode is intended for debugging the game, and for experimenting with new features. Any other use is considered cheating. Games played with wizard mode are not scored. AUTHORS
The original version of Moria was written in VMS/Pascal by Robert Alan Koeneke, Jimmey Wayne Todd, Gary McAdoo, and others at the Univer- sity of Oklahoma. This version was written by Jim Wilson at the University of California, Berkeley, and released with minor revisions by David Grabiner at Harvard University. BUGS
A suspended game that gets a hangup signal will die without creating a save file. Rerolling with a % at the class prompt not implemented. For a more comprehensive list, see the ERRORS file in the source distribution. MORIA(6)
All times are GMT -4. The time now is 02:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy