[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-users
Subject:    RE: Suppressing alerts
From:       "Tillman, James" <JamesTillman () fdle ! state ! fl ! us>
Date:       2002-06-27 11:14:05
[Download RAW message or body]

> -----Original Message-----
> From: parvez [mailto:ppathan@infofin.com]
> Sent: Thursday, June 27, 2002 1:22 AM
> To: Ron Grabowski
> Cc: perl-win32-users@activestate.com
> Subject: Re: Suppressing alerts
> 
> 
> Hi,
>     I have tried that, but that only suppresses the "Do you 
> want to save
> the File" or "The application already exists, Do you want to start it
> again" alerts. In my case the Excel sheet takes it values 
> dynamically from
> another program. Every time before opening the sheet it asks 
> me, if I want
> to link data from the application into the excel sheet("YES" is the
> obvious answer).
>     My question is how do I let my program answer that "YES" part.

I'm sorry that I don't have an answer for you, but I think you'll find that
MSOffice has many qualities about it that will create this same situation,
even if your current problem ends up getting solved.

Although MSOffice is very good at allowing programmatic control, it is
constantly getting in the way of automation by requiring user interaction at
pointless steps along the way.  These are steps which I've never figured out
how to get past programmatically, even when I've set the Visible property of
the offending application to false.  This should be enough to tell the
program that it shouldn't interact with the user, but it does anyway.

A case in point:  I once had to automate MSWord in an automated task
although I tried everything I could to avoid it.  My perl script would fire
up Word and it would hang.  So I logged on under the usercode my perl script
was using and ran Word manually, and found that Word was asking for my
initials with a modal dialog box!  I fixed this, and then after processing a
few documents, my script hung again.  This time, when I ran Word manually
and loaded in the document the script had stalled on, I found that in
starting and stopping the automated task, I had caused Word to think it had
crashed, and it was asking me if I wanted to recover the document's previous
version.  All of this happened while the Visible property of the application
was set to false.  Lesson I learned:  MSOffice cannot be reliably automated
without human oversight.  So I will never rely on that again as an option.

I realize that your situation probably doesn't rely on unattended
automation, but I thought this might help make you aware that future
problems will probably occur with your own automation.

jpt
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic