Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > WIN32OLE disable busy dialog etc

Reply
Thread Tools

WIN32OLE disable busy dialog etc

 
 
Charles Lowe
Guest
Posts: n/a
 
      04-17-2008
Hi,

I sometimes have a problem whereby during a long operation using
WIN32OLE, I get a message box, which says:

"This action cannot be completed because the other program is busy.
Choose switch to activate the busy program and correct the problem."

This same problem was ran into, and a way to circumvent it added to the
python equivalent module. See
http://mail.python.org/pipermail/pyt...st/004923.html,
and the commit
http://pywin32.cvs.sourceforge.net/p...?r1=1.5&r2=1.6.

In essence, you just need to be able to get the current message filter,
and set some flags on it. Anyone know if its possible to do this using
Win32API or similar? I spent a bit on it and couldn't figure it out.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Charles Lowe
Guest
Posts: n/a
 
      04-21-2008
Charles Lowe wrote:
> Hi,
>
> I sometimes have a problem whereby during a long operation using
> WIN32OLE, I get a message box, which says:
>
> "This action cannot be completed because the other program is busy.
> Choose switch to activate the busy program and correct the problem."
>
> This same problem was ran into, and a way to circumvent it added to the
> python equivalent module. See
> http://mail.python.org/pipermail/pyt...st/004923.html,
> and the commit
> http://pywin32.cvs.sourceforge.net/p...?r1=1.5&r2=1.6.
>
> In essence, you just need to be able to get the current message filter,
> and set some flags on it. Anyone know if its possible to do this using
> Win32API or similar? I spent a bit on it and couldn't figure it out.


Does nobody have any ideas about this? It kind of makes WIN32OLE
unusable for automating certain long running tasks.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Masaki Suketa
Guest
Posts: n/a
 
      04-22-2008
Hello,
Sorry for being too late to reply.

Charles Lowe wrote:
>
> I sometimes have a problem whereby during a long operation using
> WIN32OLE, I get a message box, which says:
>
> "This action cannot be completed because the other program is busy.
> Choose switch to activate the busy program and correct the problem."
>


Could you show me the script which occurs the problem?
I'd like to investigate the problem.
And If I could, I'd like to change Win32OLE
to solve the problem.

Regards,
Masaki Suketa


 
Reply With Quote
 
Charles Lowe
Guest
Posts: n/a
 
      04-23-2008
Masaki Suketa wrote:
> Hello,
> Sorry for being too late to reply.
>
> Charles Lowe wrote:
> >
> > I sometimes have a problem whereby during a long operation using
> > WIN32OLE, I get a message box, which says:
> >
> > "This action cannot be completed because the other program is busy.
> > Choose switch to activate the busy program and correct the problem."
> >

>
> Could you show me the script which occurs the problem?
> I'd like to investigate the problem.
> And If I could, I'd like to change Win32OLE
> to solve the problem.
>
> Regards,
> Masaki Suketa


Well, it doesn't look like much, it involves a proprietary com object
(factset api).

Code goes something like this:

comobj = WIN32OLE.new 'FactSet.FactSet_API'
comobj.runapplication 'Downloading', 'File=' + file, 'Batch=True'

Occasionally (it seems to be related to a timeout threshold), the
afore-mentioned message box will pop-up. If i click on "switch", it will
open the start menu, and then it will proceed to completion without
problem.

If you look at what was added to the python equivalent (win32uiole),
they used the "AfxOleGetMessageFilter" function, and exposed some
methods on top of that, you can just do:

win32uiole.AfxOleInit()
win32uiole.SetMessagePendingDelay(aBigDelay);
win32uiole.EnableNotRespondingDialog(False);
win32uiole.EnableBusyDialog(False);

Thanks for your help,

Charles
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Masaki Suketa
Guest
Posts: n/a
 
      04-23-2008
Hello,

Charles Lowe wrote:

> Well, it doesn't look like much, it involves a proprietary com object
> (factset api).
>
> Code goes something like this:
>
> comobj = WIN32OLE.new 'FactSet.FactSet_API'
> comobj.runapplication 'Downloading', 'File=' + file, 'Batch=True'


How can I get the factset api?

> If you look at what was added to the python equivalent (win32uiole),
> they used the "AfxOleGetMessageFilter" function, and exposed some
> methods on top of that, you can just do:
>
> win32uiole.AfxOleInit()
> win32uiole.SetMessagePendingDelay(aBigDelay);
> win32uiole.EnableNotRespondingDialog(False);
> win32uiole.EnableBusyDialog(False);


I had seen the python win32uiole, but the "AfxOleGetMessageFilter"
function is in MFC library.
And I won't use MFC library because I don't have MFC library
and Ruby source does not depend on MFC.
So I'd like to implement the python equivalent function
without MFC(AfxOleGetMessageFilter).
But I don't know how to implement it now.
I need the sample script which occurs the problem in order
to investigate how to implement it without MFC.
And If I could implement it, I would need the sample script to check
my implementation is correct or not.

Regards,
Masaki Suketa


 
Reply With Quote
 
Charles Lowe
Guest
Posts: n/a
 
      04-24-2008
Masaki Suketa wrote:
> Hello,
>
> Charles Lowe wrote:
>
> > Well, it doesn't look like much, it involves a proprietary com object
> > (factset api).
> >
> > Code goes something like this:
> >
> > comobj = WIN32OLE.new 'FactSet.FactSet_API'
> > comobj.runapplication 'Downloading', 'File=' + file, 'Batch=True'

>
> How can I get the factset api?
>
> > If you look at what was added to the python equivalent (win32uiole),
> > they used the "AfxOleGetMessageFilter" function, and exposed some
> > methods on top of that, you can just do:
> >
> > win32uiole.AfxOleInit()
> > win32uiole.SetMessagePendingDelay(aBigDelay);
> > win32uiole.EnableNotRespondingDialog(False);
> > win32uiole.EnableBusyDialog(False);

>
> I had seen the python win32uiole, but the "AfxOleGetMessageFilter"
> function is in MFC library.
> And I won't use MFC library because I don't have MFC library
> and Ruby source does not depend on MFC.
> So I'd like to implement the python equivalent function
> without MFC(AfxOleGetMessageFilter).
> But I don't know how to implement it now.
> I need the sample script which occurs the problem in order
> to investigate how to implement it without MFC.
> And If I could implement it, I would need the sample script to check
> my implementation is correct or not.
>
> Regards,
> Masaki Suketa


Unfortunately you wouldn't be able to get access to the factset api. Its
a proprietary, licensed data access api.

Hmmm, I didn't realize that the ruby source doesn't use MFC. Is it
possible, do you think, to solve this problem by loading the appropriate
dll and making the call using WIN32::Api? I tried to figure out an
approach this way with no success so far.

One possibility may be to write a simple, unfriendly test com object,
that is single threaded, and blocks for a long time when calling some
method. I think that should be sufficient to be able to reproduce the
problem locally?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Masaki Suketa
Guest
Posts: n/a
 
      04-26-2008
Charles Lowe wrote:
> Hmmm, I didn't realize that the ruby source doesn't use MFC. Is it
> possible, do you think, to solve this problem by loading the appropriate
> dll and making the call using WIN32::Api? I tried to figure out an
> approach this way with no success so far.


I am not sure... but...,
MFC is based on Windows API. So you could solve
it using WIN32::Api. But I think it is not easy way.

> One possibility may be to write a simple, unfriendly test com object,
> that is single threaded, and blocks for a long time when calling some
> method. I think that should be sufficient to be able to reproduce the
> problem locally?


Unfortunately, I have not been able to create test com object,
so I wrote that I need the factset api.
I think the factset api uses MFC and the com created with MFC
produce the problem easily.

Regards,
Masaki Suketa


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: PIL (etc etc etc) on OS X Kevin Walzer Python 4 08-13-2008 08:27 AM
WIN32OLE - failed to create WIN32OLE zxem Ruby 1 12-19-2007 07:01 PM
WIN32OLE#[] and WIN32OLE#[]= method in Ruby 1.9 (or later) Masaki Suketa Ruby 4 03-27-2006 11:17 AM
'Busy Signals' from other then the called number being busy Bob Alan VOIP 1 09-28-2005 06:21 PM
OT:Busy Busy Doom MCSE 36 07-08-2004 04:36 PM



Advertisments