Dru has asked for the wisdom of the Perl Monks concerning the following question:

Greeting Fellow Perl Aficionados,

Since day 1 all of my Perl requirements only involved text, especially since the majority of my scripts where run on Linux servers that did not even have x windows installed. Well, now I want to write a script for Windows machines which runs in a pretty window (oh the horror!). I've written a few scripts for Windows, and always just ran them in a DOS window. This would actually suit this script fine, but users are going to be executing it, and I don't want them to get turned off by the strange looking black box. I want to dazzle them with colors and flair. Well honestly, I just want to try something new (I get bored easily) and be given more control of the size of the box, colors, font, etc.

Anyway, I want it to be native to Perl (if that's possible) because I'm going to be converting it to a .exe using Active State's Perlapp from their Perl Dev Kit , which I recommend if you need this sort of thing. So I don't think Tk or QT are options, which will probably be overkill anyway. A quick look at CPAN produces Win32::GUI::XMLBuilder, which looks promising.

So, does anyone have any other recommendations or suggestions? Let's show them VB guys what Perl can do! They think there the only one's who can script in windows, oh if they only knew!

Cheers,
Dru

Replies are listed 'Best First'.
Re: Window Choices for Windows
by puploki (Hermit) on Sep 30, 2005 at 14:47 UTC

    I know you've dismissed it, but Tk may well do what you want - I certainly know that Tk works well with PAR for redistributing GUI executables (and they're not as big as you think either). This also has the advantage that the original Perl Tk script is cross-platform compatible for those that can't run the Windows binary.

    I would grant you that Tk can be a bit of a mess to learn though.

    As an aside, my boyfriend wrote a GUI app in Perl/Tk that he compiled with PAR. It simulates woodlice :)

Re: Window Choices for Windows
by liverpole (Monsignor) on Sep 30, 2005 at 15:28 UTC
    While Perl/Tk may not be "native to Perl", it *is* part of Active State's standard distribution, and runs perfectly fine when you use perlapp.  All that perlapp is doing "behind the scenes" is unbundling the program source code, modules and .dll's necessary for running Perl on a platform where it may not have been formally installed. It's not actually converting the basic program to machine-dependent object code.

    I personally favor Perl/Tk since I began learning it at the same time as Perl itself, and, when I started using Perl under Windows, was delighted to find that it works there too.  You may want to give it a try -- it's nice to be able to write Perl for one platform and have it often run seamlessly on another!

Re: Window Choices for Windows
by jplindstrom (Monsignor) on Sep 30, 2005 at 16:33 UTC
Re: Window Choices for Windows
by Dru (Hermit) on Sep 30, 2005 at 14:45 UTC
    Duh, I just found Win32::GUI, but I would still like to hear from anyone who has done something similar with success.
Re: Window Choices for Windows
by rvosa (Curate) on Sep 30, 2005 at 17:45 UTC
    There is WxGlade, which generates code for portable-but-native looking WxWidgets. Seems like a decent intermediate between tying yourself down to Win32:: and having it look like Tk.
Re: Window Choices for Windows
by Grygonos (Chaplain) on Sep 30, 2005 at 17:35 UTC
    tk has given me great results on WindowsXP. Very configurable, and has the Windows Look and feel
Re: Window Choices for Windows
by ChrisR (Hermit) on Sep 30, 2005 at 20:48 UTC
    Personally, I use Win32::GUI. However, it seems that most prefer Tk. It's cross-platform and very powerful. I use Komodo which is also from ActiveState and it even has a GUI(dialog) builder that support Perl/Tk, Tcl/Tk, and Python/Tkinter. Unfortunately for me, it does not support Win32::GUI.
Re: Window Choices for Windows
by jdtoronto (Prior) on Sep 30, 2005 at 20:22 UTC
    I note that others have had plenty to say about using Tk! I would add to that. I have been using Perl/Tk for a lot of Windows GUI programming. I use the ActiveState distribution, and the Perl Dev Kit - the whole thing works flawlessly. As others have said, the files are not as big as you might think either!

    jdtoronto

Re: Window Choices for Windows
by holli (Abbot) on Oct 01, 2005 at 07:13 UTC
    Using Perl.NET you can easily create a .NET-Dll. Just define a good interface to your code and leave the gui to the "VB guys" ;-)


    holli, /regexed monk/