Hi,

Win32::SetChildShowWindow(0);

at the start of your script, then any command windows you start will not be 
visible.
See Win32 docs for full description.

Regards

Mark

Jon Bjornstad wrote:
> Thanks for this feedback, Stuart.
> 
> I use perl2exe with the -gui option to eliminate
> the DOS window on my Perl/Tk script.
> 
> I launch CLAmp.exe with a system() from my script.
> It is the DOS window that results from the system()
> that I am trying to control/eliminate.
> 
> Talking directly to Winamp would avoid this - as I am
> doing with the simple commands (pause, next, previous,
> volume up, etc).    It is the loading of songs that
> I cannot seem to do.
> 
> Jon
> 
> 
> 
> 
> On May 16, 2008, at 2:40 PM, Stuart Arnold wrote:
> 
>> You can control the behaviour of the CONSOLE window yourself, unless  
>> the
>> package you are using is launching things, but anyway, here's what I
>> use:
>>
>> use Win32::GUI;
>> my $perlwin = Win32::GUI::GetPerlWindow();   # the console window
>> perl is running in.
>> Win32::GUI::Show( $perlwin, 0 ); # SW_HIDE
>> Win32::GUI::Show( $perlwin, 1 ); # SW_SHOWNORMAL
>> Win32::GUI::Show( $perlwin, 5 ); # SW_SHOW
>> Win32::GUI::Show( $perlwin, 6 ); # SW_MINIMIZE
>>
>> Try your options on these.
>>
>> If something else is firing off this, then you need to get that  
>> window,
>> eg, winamp, via GetForegroundWindow();
>>
>> Play around a little on it. I sometimes use the "owner" window as the
>> "DesktopWindow" to get better results.
>>
>> [EMAIL PROTECTED]
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf  
>> Of
>> Jon Bjornstad
>> Sent: Friday, May 16, 2008 3:20 PM
>> To: [email protected]
>> Subject: Re: controlling Winamp
>>
>>
>> Greetings,
>>
>> I have a Win32 Perl/Tk application
>> that controls Winamp in two different ways.
>>
>> One is via Win32::GUI:
>>
>>    $winampHandle = Win32::GUI::FindWindow("Winamp v1.x", "");
>>    Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40047, 0 );
>>
>> 40047 means "Stop".
>>
>> As far as I can determine
>> the above technique cannot be used to
>> load a series of mp3 files into Winamp's playlist.
>> To do this I found an application called 'CLAmp'
>> which somehow takes command line arguments
>> and sends them to WinAmp:
>>
>>> CLAmp.exe /clear /load song.mp3 /load sonata.mp3 /play
>> This does work but a weakness is that a black DOS window flashes in
>> front of my beautiful Perl/Tk app while the loading takes place.
>>
>> I have sent an inquiry to the author of CLAmp to see how
>> it does this loading of mp3 files but thought I would direct my  
>> query to
>> this perl-win32-users list as well.
>>
>> Any help is most appreciated.
>>
>> Thank you,
>> Jon
>>
>>
>>
>> _______________________________________________
>> Perl-Win32-Users mailing list Perl-Win32- 
>> [EMAIL PROTECTED]
>> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>>
> 
> 
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to