In what language do people recommend using a simple GUI that can be used as input to run a script on Cygwin?

I need a simple window with three input fields and three shortcuts (username, password and server node) and a button to execute the script. I don't need any third party software that needs to be installed on Windows. If it can be installed on Cygwin that would be great.

0


source to share


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


A lot of people have used TCL / TK for this kind of thing (in cygwin).



If it's easy for Windows, then any .NET language using Winforms will be easy to use (you won't need to redistribute .NET unless you have older boxes).

+1


source







All Articles