Message Box Help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Message Box Help
# 1  
Old 06-01-2009
Message Box Help

Hi,

This should be a fairly simple question.

I want a message box with okcancel options where ok will proceed with my program, and cancel will cancel the program and terminate the kornshell.

Code:
 
# Get input directory from user
InputDirectory=$(fileBox -D -d "Y:/job/03013rsi/edit" -t "Select translation directory")
 
#Define button return values
OK=1
Cancel=3
 
#Display Messagebox
msgbox -fb okcancel -d1 -i information jepp_change_v4_bryan.ksh "*sometext"

I was under the impression, from viewing the msksoftware website, that the button return values are printed to standard output unless otherwise specified by the use of the -q option. And that exit status values are:

0 - failed
1 - successful
2 - cancel
3 - abort
4 - retry
5 - ignore
6 - yes
7 - no

Thus, when I defined my button return values I choose Ok - 1 = successful and Cancel - 3 = abort

thanks

Bryan
# 2  
Old 06-02-2009
The exit status is in $?

To do something with the result, you can use successive if-elif-else-fi statements, or you can use a case...esac clause.
# 3  
Old 06-04-2009
Thanks Otheus,

After consulting the MS Toolkits Help, I've added to my original code. My new code:

Code:
#Define button return values
OK=1
Cancel=2

msgbox -fqb okcancel -d1 -i information jepp_change_v1_bryan.ksh
"some text"
case $? in
$OK) more $1 ;;
$Cancel) exit ;;
esac

Unfortunately a messagebox fails to appear when I execute my script...any thoughts?

Thanks,

Bryan
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. How to Post in the The UNIX and Linux Forums

Copying , renaming the file from windox box and ftp to Linux box

Hello my dear friends, Two file are auto generated from mon - fri at different directories on same windows box.Every day i have to copy the file, rename it (specific name)and ftp it to linux box specified directory. is it possible to automate this process,If yes this has to be done from windows... (1 Reply)
Discussion started by: umesh yadav
1 Replies

2. Shell Programming and Scripting

Notify when the script run(hourly)on my jump-box only when there is a failure on my remote-box

Team, Presently I have a script, which i have set up cron on one of my Jump-boxes,and gives me the output on every hourly basis,fetching the data from the remote machine.Basically it gives me the list of all active users logged and its count once we execute the script.Here the count is... (6 Replies)
Discussion started by: whizkidash
6 Replies

3. Red Hat

How to access redhat Linux box graphically from windows box?

Hi I have a linux box and need to access from windows graphically # uname -a Linux pc-l416116 2.6.18-155.el5 #1 SMP Fri Jun 19 17:06:47 EDT 2009 i686 i686 i386 GNU/Linux What components do I need to install on Linux and windows to do that? TIA (6 Replies)
Discussion started by: magnus29
6 Replies

4. Web Development

How to copy a selected value of list box into a text box in html form?

hi, i have a list box , a text box and a button in a html form. list box displays some values, when a user selects a value from the list box and press the button. the selected value should be copied to the text box value. can any1 give me a html and javascript code to do this facility. ... (1 Reply)
Discussion started by: Little
1 Replies

5. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

6. Programming

"Blocking" message box in Motif

Hi, i remember that when programming for Windows i used the MessageBox function,which blocked my application until the user made his/her choice. So,that function returned only after this choice. Now i'm using the QuestionDialog widget in motif,and i would like to have that behaviour:is there... (1 Reply)
Discussion started by: Zipi
1 Replies

7. Solaris

Need to copy printers from Sol8 box to Sol10 box-No luck so far

I need to copy the printers currently installed on a Sol8 box to a Sol10 box. I tried copying the printers.conf file from the Sol8 box and that worked until I went through the file and changed the server name to that of the Sol10 box. Another post on this forum suggested copying the entire... (1 Reply)
Discussion started by: todis
1 Replies

8. UNIX for Advanced & Expert Users

Access files from prev box after SSH to another box

i'm not much of an advanced unix programmer but I'm trying to write a script to access files on box1 after ssh from box 1 to box2. when ssh is invoked in the script i'm getting logged into box2 and losing complete touch with box1 which is normal i guess. but my main aim with my script is when i... (3 Replies)
Discussion started by: pharos467
3 Replies

9. UNIX for Advanced & Expert Users

How to FTP a file generated at UNIX Box to NT Box

Hi all, I am generating a file on the Unix machine , now i want to FTP the same file to the NT machine. how can i do that and the application currently upon which i am working is a JAVA based application. I need your help. regards Ruchir (2 Replies)
Discussion started by: Ruchir
2 Replies

10. UNIX for Advanced & Expert Users

VPN client (windows Box),and Server (Unix Box)

If I want to access unix box via VPN tunnel,from windows box. What sould I configure on the windows client PC, and what should I enable on the Unix Server box ? I am using Solaris V10 intel platform, and I am using windows XP, and 2003 for client (0 Replies)
Discussion started by: zillah
0 Replies
Login or Register to Ask a Question