GUI and Console in the same application?

View: New views
2 Messages — Rating Filter:   Alert me  

GUI and Console in the same application?

by Craig Nuckels :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, I'm having some trouble with getting an idea I have (that I think will work) actually implemented in Perl.

 

I work at a job that has me connecting to various systems all over the place with the command prompt (Win32 environment). I also have a rather large collection of scripts, batch files, and commands that I use frequently on the systems I connect to. What I'm trying to do is to reduce some of the repetitive tasks while working on these systems.

 

I want to have a command prompt that basically has a toolbar of sorts associated with it, which will have buttons for my most used scripts/commands/etc, so that when I click on a button the information is either pasted to the window, or the script launches in the background on the appropriate system. I have tried researching this online via Google without much luck. (Searching for things like wrapping command prompt, etc.)

 

I already have a Perl script that makes my connections for me, which I run from a regular command prompt, and then the connection script backticks out the remote console application. So I am either looking to add the functionality to that script, or if I could get a command prompt wrapped into a Perl window, I could add the connection script to it


Any suggestions or pointers of where I can look for more information?


Thanks!


- Craig


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@...
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/

Re: GUI and Console in the same application?

by Jeremy White-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

The way I would approach this is to have one thread controlling the GUI and then have worker threads that do the actual work. Using the threading approach will allow you more interactivity, and if any of the jobs are processor bound you'll gain significant performance on dual/quad cores.

Have a look at the Win32::GUI::ThreadUtils package on:

http://www.robmay.me.uk/win32gui

Although it's "EXPERIMENTAL" it will show how to raise an event in the GUI thread from a worker thread via a thread safe message queue. It might sound complicated, but it does work well and makes life simpler for boss/worker coding.

Also have a look at the link below, using a database:

http://perl-win32-gui.sourceforge.net/cgi-bin/wiki.cgi?Multi_Threaded_Win32-GUI_App_Using_The_DBI_(DBD-Mysql)

Cheers,

jez.

________________________________
Date: Tue, 1 Jul 2008 07:47:16 -0500
From: saski.fx@...
To: perl-win32-gui-users@...
Subject: [perl-win32-gui-users] GUI and Console in the same application?



Hi, I'm having some trouble with getting an idea I have (that I think
will work) actually implemented in Perl.





I work at a job that has me connecting to various systems all over the
place with the command prompt (Win32 environment). I also have a rather large
collection of scripts, batch files, and commands that I use frequently on the
systems I connect to. What I'm trying to do is to reduce some of the repetitive
tasks while working on these systems.





I want to have a command prompt that basically has a toolbar of sorts
associated with it, which will have buttons for my most used
scripts/commands/etc, so that when I click on a button the information is either
pasted to the window, or the script launches in the background on the
appropriate system. I have tried researching this online via Google without much
luck. (Searching for things like wrapping command prompt, etc.)





I already have a Perl script that makes my connections for me, which I
run from a regular command prompt, and then the connection script backticks out
the remote console application. So I am either looking to add the functionality
to that script, or if I could get a command prompt wrapped into a Perl window, I
could add the connection script to it


Any suggestions or pointers of where I can look for more information?



Thanks!



- Craig


_________________________________________________________________
100’s of Nikon cameras to be won with Live Search
http://clk.atdmt.com/UKM/go/101719808/direct/01/
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@...
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/
LightInTheBox - Buy quality products at wholesale price