Forum: Ruby win32ole - wait for action to complete

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
36dc4f24c96573106429f590429aa9d5?d=identicon&s=25 Rich Hall (rhall)
on 2006-05-05 17:30
I have a script driving a proprietary Powerbuilder application via
sendkeys. I am trying to time application processing time. My approach
was grab start time, sendkeys to application, grab finish time and
calculate the diff. However, my four seperate timing steps all print
thier complete timestamps before the application is even done processing
one step. In Marcus Tettmar's MacroScheduler he has a WaitReady function
that seems to do a good job waiting for the driven event to complete
before continuing execution. I assumed this was making a call to an OLE
function, but have not been able to find such a function. Is there a way
to make my automation script behave in a synchronous fashion so that I
can use it to get accurate timing? Is there a win32ole function for
this? Or is Macroscheduler using its own function to provide this?

I would imagine such a routine could be created using win32event, but I
am very new to Ruby and have no idea where to start to build such a
thing. Would appreciate any input you can provide to set me in the right
direction.
695abc793d51f62f781ef035c232f826?d=identicon&s=25 John Johnson (Guest)
on 2006-05-05 19:22
(Received via mailing list)
You could use WinBatch http://winbatch.com for this.
You could even call it from Ruby, if need be.

Regards,
   JJ

On 05-May-2006, at 11:30, Rich Hall wrote:

> function, but have not been able to find such a function. Is there a
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

---
"America goes not abroad in search of monsters to destroy." -- John
Quincy Adams
36dc4f24c96573106429f590429aa9d5?d=identicon&s=25 Rich Hall (rhall)
on 2006-05-05 19:40
Thanks. I'm trying to avoid using software I'll have to license (part of
my rationale for using Ruby for this in the first place vs. using
WinBatch or similar). If this script works, I will want to distribute it
to many machines.

John Johnson wrote:
> You could use WinBatch http://winbatch.com for this.
> You could even call it from Ruby, if need be.
>
> Regards,
>    JJ
This topic is locked and can not be replied to.