::Process::KillProcess( $objItem-{ProcessId}, $event )) { By creating a line which took the object out of the line and replace with $PID.my $PID = $objItem-{ProcessId};if(Win32::Process::KillProcess( $PID, $event )) {Jim Hansen [EMAIL PROTECTED] wrote:Here is a simple script I wrote
There are several methods to enumerating processes. Not only the entire system process, but those running in the user's own memory space. Using WMI, Lanman, Perflib, etc. Which is the best way to go? Also, instead of running through a process list a half a dozen times until the app has loaded,
Hello all.I saw someone ask about WTSQuerySessioninformation some time back and I was wondering if there was a way to combine WTSEnumerateSessions, WTSQuerySessionInformation and WTSWaitSystemEvent so that when the WTSWaitSystemEvent triggers a logon, you can use the othr two to determine who
Here is a simple script I wrote that works fine when stepped throguh with the PDK debugger, but when run without the -d switch, I get this error:Win32::OLE(0.1704): GetOleEnumObject() Not a Win32::OLE::Enum object at C:/Perl/site/lib/Win32/OLE/Lite.pm line 167.I've seen something similar
::KillProcess( $PID, $event )) {Jim Hansen [EMAIL PROTECTED] wrote:Here is a simple script I wrote that works fine when stepped throguh with the PDK debugger, but when run without the -d switch, I get this error:Win32::OLE(0.1704): GetOleEnumObject() Not a Win32::OLE::Enum object at C:/Perl
I've been able to finally get TK:Statusbar to work,
but still not sure how to get rid of the buttons. I
would like this to automatically launch the Start
subroutine w/o pressing a button to do it. Anyone
have experience with TK in bypassing the need for
human interaction? I would Post this to
Bill,
the IPC looks like the best way to go, short of
writing a .pm. Does the child process have to be set
up in any special way, like with functions in order to
receive the write handles?
MJG
--- $Bill Luebkert [EMAIL PROTECTED] wrote:
Jim Hansen wrote:
I have two small .pl programs
I have two small .pl programs I've written. One calls
the other with Win32::Process. The child program is
just a splash screen. When the parent is done with
its thing, I kill the child process. Works ok. What
I would like to do is create a status bar on the
splash. I have that done, but
Or use MRTG. Free and written in Perl.
MJGEric Logeson [EMAIL PROTECTED] wrote:
Hello List
I wanted to get some basic bandwidth statistics across a WAN link. The approach I think I am going to take is the following:
Usea perl scipt to read in a bunch of files, determine the sizes, start a timer
To the TK wizs: I'm trying to set up a simple Perl/TK window that will display a status message as a background process does it's thing. Although this works, it requires user intervention to close the window so the program can carry on. This is probably a big question, but how can I add this to
] wrote:
Jim Hansen wrote:
Can this be made dynamic or is it strictly static
as
far as number of rows and contents:
For example, this doesn't work, but can it in some
way?
my $status EOD
$a=0;
foreach $server (@Servers){
$a++;
server $server[$a]\n
Just add some generated output to Win32::MsgBox or
Win32::GUI by using EOD.
--- Charles K. Clarkson [EMAIL PROTECTED]
wrote:
Jim Hansen wrote:
: Can this be made dynamic or is it strictly static
as
: far as number of rows and contents:
:
: For example, this doesn't work, but can
Can this be made dynamic or is it strictly static as
far as number of rows and contents:
For example, this doesn't work, but can it in some
way?
my $status EOD
$a=0;
foreach $server (@Servers){
$a++;
server $server[$a]\n
}
EOD
Discover Yahoo!
Find restaurants,
After I sent this I did find it, since someone pointed
out my lack of attention to detail.. I thought I
should check. After fixing my syntax, it still fails.
--- Ted Schuerzinger [EMAIL PROTECTED] wrote:
Jim Hansen graced perl with these words of wisdom:
my $status EOD
$a=0
Anyone know of any good VPerl books?
Thanks
M-
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site! ___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe:
I'm trying to set up a simple WMI script. This runs on my workstation, but not a 2000 Server running Perl 5.8.2. If someone could check my code, I would apprciate it.
M-
use strict;use Win32::OLE('in');use Win32 ();
my $Class = "Win32_UTCTime";my $Machine = Win32::NodeName();
my $objWMI =
You are right. I do it rarely, but I was in the DOS
days, but I was also a hand to hand combat instructor.
One probably doesn't mix well with the other you
think?
--- $Bill Luebkert [EMAIL PROTECTED] wrote:
Jim Hansen wrote:
I'm trying to set up a simple WMI script. This
runs on my
Luebkert [EMAIL PROTECTED] wrote:
Jim Hansen wrote:
Bill
The time delay helped out (sleep 1) was good
enough. I did find out too
that passing C:/Windows/notepad.exe into $ARGV
or @ARGV[0] causes your
script to produce this:
Window Found(Text : 'C:\WINDOWS\system32\cmd.exe -
perl
Here is a tricky one...
I'm trying to get a window handle from a window I
launch through Win32::Process, but the debug result I
get seems to be picking up the cmd prompt window
rather than something simple like notepad.
Using this command line:
perl script.pl c:/windows/notepad.exe *Notepad
use
indowClass' Handle: '1769972')
If I do a search with just '*', I get every window and this is the only information I get for notepad as well.
I'm on Perl 5.8.2 with WinXP SP2 so I don't know if this is causing the issue or not.
Thanks Bill
Jim
$Bill Luebkert [EMAIL PROTECTED] wrote:
Jim Hansen w
. So the bottom line is, the command line argument is causing it.
J-
$Bill Luebkert [EMAIL PROTECTED] wrote:
Jim Hansen wrote: The '*' was the only thing I could find. Not a lot of info and Microsoft's site on this was no help. At anyrate, when I make the changes to the search, I still get Wi
AIL PROTECTED] wrote:
Jim Hansen wrote: I need to parse a string with a specific phrase within it. For example: "PSserverxx" What is the best way to do this?Insufficient explanation. What do you mean by parse ? Are you tryingto see if that substr is in the string or what ? Show
] wrote:
Jim Hansen wrote:
Sorry. Lousy explanation. I have a string that
will have
PSserver01...02, etc. I need to check for this
string:
$Printserver = HP4000 [PSserver01]
I guess this can be as simple as
$Printserver = HP4000 [PSserver01]
if ( ! /PSserver/ ) {
do
THat's not doing it either. For some reason, when it
is compiled, that line is ignored.
--- Robert Johnson [EMAIL PROTECTED] wrote:
Jim Hansen wrote:
$name = 'HP4000 [PSserver01]';
if ( $name =~ /[PSserver/ ) {
next;
}
running this straight as a script with the '-d'
switch
I need to parse a string with a specific phrase within it.
For example:
"PSserverxx"
What is the best way to do this?
Thanks
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!___
Perl-Win32-Users mailing list
How strict is 'struct' when it comes to passing data
to and from sub routines and how do you do that?
I have a subroutine that counts items, then returns to
the calling program, but even when I set return like
return(@Value1,$Value2,$counter);
the calling program does not have the information.
Is there a way to travere through a registry key
without have to move to TieRegistry?
For example:
HKCU\Software\Activestate\General
Has several items to list, mostly DWORD values.
Can I use Win32::Registry to traverse through these
values?
Thanks...
no
matter how the window opens - it doesn't have to be
done via an OLE object.
Win32::GuiTest doesn't look for changes to the set
of
open windows, but it does let you get a window if
you know its title, wndclass and/or other details.
--- Jim Hansen [EMAIL PROTECTED] wrote:
Hello
?
Thanks
--- Jim Hansen [EMAIL PROTECTED] wrote:
Thanks for the info. I've tried the example script
in
the docs and it seems to produce a Window Handle
that
GetSystemMenu seems to have issues with and gives me
an error about an invalid handle. Is there a
conversion I need to go through
Hello.
I found a snipet of code that someone posted for
producing the window handle from an OLE object.
my $ie = Win32::OLE-
new('InternetExplorer.Application');
$ie- Navigate('http://www.somesite.com');
$ie- {Visible} = 1;
my $hWnd = $ie- {HWND};
Instead of IE, I would like to do this with any
I am trying to convert a VBScript to Perl. The APIs
are the fun part. A note: VBScript does not access
APIs by default. You need wshAPIToolkitObject.ocx
file registered on the workstation/server so it can.
If anyone would like to use this, be my guest. This
script runs from a terminal server
31 matches
Mail list logo