Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get a return value from a Tk script?

Status
Not open for further replies.

nashuakid

Programmer
Oct 27, 2011
1
I run the following script from a C-program under Mac OS (Snow Leopard) with the system () command:

#!/usr/local/bin/wish
set answer [tk_messageBox -message "Really quit?" -type yesno -icon question]
switch -- $answer {
yes exit 1
no exit 2
}

When returning from the script the C program needs to know what button was clicked.
Can someone help?

Thank you.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top