In what language do people recommend using a simple GUI that can be used as input to run a script on Cygwin?
2 answers
Maybe you should take a look at Tcl / Tk and the idea of starks and starter packages. With the latter, you can create a single file executable so that end users don't have to install anything other than this program.
By using tk 8.5 you will also take advantage of the native widgets, so the GUI can look very professional.
The code looks something like this:
package require Tk 8.5
proc main {} {
ttk::frame .f
ttk::label .l1 -text "Username:" -anchor e
ttk::label .l2 -text "Password:" -anchor e
ttk::label .l3 -text "Server:" -anchor e
ttk::entry .e1 -textvariable data(username)
ttk::entry .e2 -textvariable data(password) -show *
ttk::entry .e3 -textvariable data(server)
ttk::button .b1 -text "Submit" -command run
grid .l1 .e1 -sticky ew -in .f -padx 4
grid .l2 .e2 -sticky ew -in .f -padx 4
grid .l3 .e3 -sticky ew -in .f -padx 4
grid x .b1 -sticky e -row 4 -in .f -padx 4 -pady 4
grid rowconfigure .f 3 -weight 1
grid columnconfigure .f 1 -weight 1
pack .f -side top -fill both -expand true
focus .e1
}
proc run {} {
global data
puts "username: $data(username)"
puts "password: $data(password)"
puts "server: $data(server)"
}
main
+2
source to share