Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: cause a delay in script

by guha (Priest)
on Jul 27, 2007 at 12:06 UTC ( #629085=note: print w/ replies, xml ) Need Help??


in reply to Re^2: cause a delay in script
in thread cause a delay in script

I have seen this type of annoying behaviour in both Excel and Word which leads me to think that it has something to do with OLE itself. I have several programs where I had to put in a sleep 3 here and a sleep 5 there, which sucks of course. If you enable the visible property of the application thing gets even worse.

From what I've gathered perl's interface to OLE is "single-threaded", aka methods shouldn't return until done, but that is not the case obviously.

There are some properties in Word/Excel which enables "background" processing, mainly printing and spell checking, that you could try to disable, this is just a hunch on my part that may improve your situation or most probably not.

I have tried extensively to find some property that would indicate if the OLE engine is in idle state which would be pollable, mainly as a workaround, but have come up with nothing so far.

I am interested to hear what progress you make, collecting evidence to crack this issue I guess.


Comment on Re^3: cause a delay in script
Re^4: cause a delay in script
by momukhtar (Initiate) on Aug 20, 2007 at 20:05 UTC
    Actually the problem I found out was that it was not updating the charts after opening the file through the script as it normally do when you open the file by double clicking. So, I write down a macro to update the charts and then called that macro in the script and the problem is solved now.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://629085]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-04 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls