Bakken, Luke [BL], on Thursday, March 3, 2005 at 09:26 (-0800) wrote
these comments:

BL> Use Win32::Process:
BL> http://search.cpan.org/~jdb/libwin32-0.24/Process/Process.pm

thanks, now I can set priority of running program:

use strict;
use warnings;
use Win32::Process::Info;
use Win32::Process;
use Win32;

my $pi = Win32::Process::Info->new();

for my $x ( $pi->GetProcInfo() ) { 
        if ( $x->{Name} =~ /program_name/i ) {
                my $po;
                Win32::Process::Open($po,$x->{ProcessId},0) || die "Error\n";
                $po->SetPriorityClass(IDLE_PRIORITY_CLASS);
                exit;
        }
}

Perl is amazing...:)

-- 

 ...m8s, cu l8r, Brano.

[Don't just do something, stand there.]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to