in reply to launch perl app in minimized mode

What exactly are you looking for? Do you not want them to see the console window flash by their eyes, or does your script do more than just execute a batch file then exit?

With perlapp from ActiveState, you can add some simple Tk to just have a nice window that says "My App Name" and give them a button which allows them to exit the app, then compile with the  --gui option. Heck, you could even make it a one pixel window and destroy it yourself at the end of your script. If you control the computer which they use your .exe on, you can tell windows to launch it minimized (go to Properties and set Run: to "minimized" instead of "Normal Window."

- - arden.

Replies are listed 'Best First'.
Re: Re: launch perl app in minimized mode
by Anonymous Monk on Feb 26, 2004 at 15:17 UTC
    Basically the batch file will launch some other GUI apps. That's why I want to minimize the perl app console window. Do we really need to create a Tk window app since there's no click event required ?
      No, you don't need to, it is just one option. Again, what exactly do you want? I'm not sure if you don't want to see perl's console window or the batch file's console.

      Again, if you control the computers it is run on, right-click on your compiled script, go to "properties", and change the Run: field to "minimized" instead of "Normal Window". It's not a perl way of doing it, but aside from the  --gui option provided by perlapp, I can't think of another solution. I know that by adding Tk you'll increase your executable size by about 800 Kb, but if size isn't a concern for you, it is an aesthetic way of handling the issue. In fact, although I've never tried it, I don't think you have to use Tk to use the  --gui option at all, it just won't have a console.

      Alternatively, have you looked at perltray within the PerlDevKit? I haven't used it, but it looks like a different way of accomplishing the task you're looking for, but I can only imagine that it will also add ~1 MB to your executable.

      - - arden.