Re: Odd OLE error

2006-06-12 Thread Jim Hansen
::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

Second Question-best way to enumerate Process

2006-06-08 Thread Jim Hansen
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,

Lanman WTS API

2006-06-08 Thread Jim Hansen
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

Odd OLE error

2006-06-08 Thread Jim Hansen
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

Re: Odd OLE error

2006-06-08 Thread Jim Hansen
::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

TK Question

2005-06-02 Thread Jim Hansen
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

Re: Passing parameters

2005-05-27 Thread Jim Hansen
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

Passing parameters

2005-05-26 Thread Jim Hansen
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

Re: Measure bandwidth

2005-05-25 Thread Jim Hansen
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

TK Window

2005-05-12 Thread Jim Hansen
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

Re: EOD

2005-05-08 Thread Jim Hansen
] 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

RE: EOD

2005-05-08 Thread Jim Hansen
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

EOD

2005-05-07 Thread Jim Hansen
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,

Re: EOD

2005-05-07 Thread Jim Hansen
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

Visual Perl / Visual Perl .Net books

2005-05-05 Thread Jim Hansen
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:

WMI

2005-05-05 Thread Jim Hansen
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 =

Re: WMI

2005-05-05 Thread Jim Hansen
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

Re: Win32::Guitest

2005-04-21 Thread Jim Hansen
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

Win32::Guitest

2005-04-20 Thread Jim Hansen
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

Re: Win32::Guitest

2005-04-20 Thread Jim Hansen
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

Re: Win32::Guitest

2005-04-20 Thread Jim Hansen
. 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

Re: Regex

2005-04-16 Thread Jim Hansen
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

RE: Regex

2005-04-16 Thread Jim Hansen
] 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

RE: Regex

2005-04-16 Thread Jim Hansen
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

Regex

2005-04-15 Thread Jim Hansen
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

using strict

2005-04-07 Thread Jim Hansen
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.

Win32:Registry

2005-04-04 Thread Jim Hansen
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...

Re: Window Handle

2005-03-27 Thread Jim Hansen
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

Re: Window Handle

2005-03-27 Thread Jim Hansen
? 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

Window Handle

2005-03-24 Thread Jim Hansen
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

Disable X in VBScript Conversion to Perl

2005-03-24 Thread Jim Hansen
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