A completely untested thought that popped into my head when reading the
thread...
Get all PIDs for Excel instances.
Start your instance of Excel.
Get all PIDs for Excel instances.
This way you should be able to work out which one is yours?
Like I said, untested, and just a thought.
R.
: [EMAIL PROTECTED]
> Cc: 'Perl Win32 Forum (ActiveState)'
> Subject: Re: Killing a Process
>
> Leroy G. Blimegger Jr. wrote:
>
> Should have known you'd be using Win32::OLE.
> I really don't know much ... and that's especially true of Win32::OLE.
> But if y
Leroy G. Blimegger Jr. wrote:
Should have known you'd be using Win32::OLE.
I really don't know much ... and that's especially true of Win32::OLE.
But if you have an instance of Excel that you've started with
Win32::Process, you could access *it* instead of starting up a new
instance of it:
Excel?
Lee
> -Original Message-
> From: Sisyphus [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 26, 2004 12:24 PM
> To: [EMAIL PROTECTED]
> Cc: 'Perl Win32 Forum (ActiveState)'; [EMAIL PROTECTED]
> Subject: Re: Killing a Process
>
> Leroy G. Blimegge
Leroy G. Blimegger Jr. wrote:
Is there a way to kill a child process (Excel) if the perl app process is
killed? OR, is there a way to determine the process ID of Excel when the
perl app starts Excel? If so, I can pass the PID back to the VB app and kill
both processes if the Excel process has start
Hi All,
I don't know if I can solve this problem in perl or in VB.NET, so I'm
posting this to both lists.
I have a perl app that writes information to an Excel spreadsheet. I'm
trapping control-c and breaks in the perl app, so if the user terminates the
app, if Excel has been started, the perl ap
nday, February 17, 2003 11:09 PM
> To: [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: FW: killing a process by window title; was: socket
> application
>
>
> Somebody help please !!
>
> -Original Message-
> From: Jangale V-S
> Sent: 13 Februa
Somebody help please !!
-Original Message-
From: Jangale V-S
Sent: 13 February 2003 11:06
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: killing a process by window title; was: socket application
Further to this topic I have a slightly different requirement.
I want to kill
Dirk, Rob, et. al.,
OK... I couldn't leave it alone. I sat down and cleaned up the code. I
have replace the API calls with calls to Win32::Process and Win32::GUI, and
have improved the error handling. I also reformatted the lines to try to
prevent my mailer from wrapping them wrong. They look
> -Original Message-
> From: Sisyphus [mailto:[EMAIL PROTECTED]]
> - Original Message -
> From: "Dirk Bremer (NISC)" <[EMAIL PROTECTED]>
> >
> > Some of the lines of your script were wrapped bu email, so
> I hope that I
> > reconstructed them correctly. I found I first needed to in
> Now, getting the window title I don't know about. I was about to suggest
> Win32::Console::Title, but that, I believe, is only the command window
(if
> any) that is running the current script.
>
> Anyone?
>
I would try using Win32::API with autoitdll.dll (hiddensoft.com). I tested
the snip
This seems like a useful starting point, courtesy of Dave Roth:
http://www.roth.net/perl/scripts/scripts.asp?ProcList.pl
In Python, I sometimes use one of the distribution scripts called killProcName.py.
Here's an excerpt which can probably be translated to Perl without too much difficulty:
12 matches
Mail list logo