Hi doug: 
I have seen this with two cases of on shutdown locking
I think you've resolved this.
Any idea when..?
Sean. 

-----Original Message-----
From: Doug Geoffray [mailto:[EMAIL PROTECTED] 
Sent: 04 August 2008 17:41
To: [email protected]
Subject: Re: Client.OnShutdown query

Sean,

For the record, I tried your script by associating it to Notepad.  It 
started fine and shut down fine when I shut down Notepad.  So either 
something is different in your setup or we have resolved this post beta 
1.  I am using a build that will soon be beta 2.

Regards,
Doug

Aaron Smith wrote:
> I would try not disconnecting from OnShutdown while the script is in 
> the process of shutting down. That seems a recipe for disaster.
>
> Aaron
>
> Sean Farrow wrote:
>> Any ideas what could be causing the thing to freeze after closing the
>> app then.
>> How can I rack this down.
>> Sean.
>> -----Original Message-----
>> From: Aaron Smith [mailto:[EMAIL PROTECTED] Sent: 03 August 2008
18:06
>> To: [email protected]
>> Subject: Re: Client.OnShutdown query
>>
>> It's up to you. Ideally, you'd keep track of your events, and
disconnect
>>
>> from them when necessary. Window-Eyes does, however, clean up after 
>> you if you don't do it yourself when the script closes. It's still a 
>> good habit to get into.
>>
>> Aaron
>>
>> Sean Farrow wrote:
>>> Ok, can I just call connect event, or do I need two veriables?
>>> Sean.
>>> -----Original Message-----
>>> From: Aaron Smith [mailto:[EMAIL PROTECTED] Sent: 03 August 2008
17:53
>>> To: [email protected]
>>> Subject: Re: Client.OnShutdown query
>>>
>>> You don't want to disconnect your FocusWindowEvent event during your

>>> FocusWindowEvent routine, otherwise, you'll get one focus
>> notification,
>>> and then no more until your script runs again.
>>>
>>> Aaron
>>>
>>> Sean Farrow wrote:
>>>> Hi: After writing a shutdown event, window-eyes now sems to freeze 
>>>> after
>>>> closing the specific application.
>>>> Please could someone help, code below.
>>>> Any ideas apreciated.
>>>> Sean.
>>>> 'code vbscript.
>>>> '---
>>>> 'Scripts for codegear rad studio 2007.
>>>> 'Copyright (c) 2008, Sean Farrow.
>>>> 'All rights reserved.
>>>> 'Connect the event wich finds the TAppBuilder class. This is
needed,
>>> to
>>>> allow us to detect the correct 'focus once inside the application.
>>>> dim FocusWindowEvent
>>>> Dim ShutdownEvent
>>>>
>>>> FocusWindowEvent = ConnectEvent(DesktopWindow, "OnChildFocus",
>>>> "ProcessOnChildFocus")
>>>> ShutdownEvent = ConnectEvent(ClientInformation, "OnShutDown",
>>>> "ProcessOnShutdown")
>>>>
>>>> Sub ProcessOnChildFocus(windowObject)
>>>> ' React to OnChildFocus events
>>>> if strComp(windowObject.ClassName, "TAppBuilder", vbBinaryCompare)
=0
>>>> then
>>>> 'Change the window we are detecting child focus events for, to the
>>>> TAppBuilderClass.
>>>>             Disconnect(FocusWindowEvent)
>>>> FocusWindowEvent             = ConnectEvent(windowObject,
>>>> "OnChildFocus", "ProcessOnChildFocus")
>>>> end if
>>>> End Sub
>>>>
>>>> Sub ProcessOnShutdown()
>>>> ' Disconnect events and any other cleanup procedures required.
>>>> Disconnect(ShutdownEvent)
>>>> Disconnect(FocusEvent)
>>>> End Sub
>>>>
>>>> -----Original Message-----
>>>> From: Tom Kingston [mailto:[EMAIL PROTECTED] Sent: 03 
>>>> August 2008 14:32
>>>> To: [email protected]
>>>> Subject: Re: Client.OnShutdown query
>>>>
>>>> Virtually every script should be using this event to disconnect
>> events
>>>> if nothing else. The sub can be anything you want because it's 
>>>> named in
>>> the
>>>> ConnectEvent call as follows. Let's say you have two events
>> connected.
>>>> Here's how it would look.
>>>>
>>>> Dim winEvents(1) ' Note: arrays are 0 indexed.
>>>> winEvents(0) = ConnectEvent(ClientInformation.Overlap,
>> "OnChildFocus",
>>>> "ProcessOnChildFocus")
>>>> winEvents(1) = ConnectEvent(ClientInformation, "OnShutDown", 
>>>> "ProcessOnShutdown")
>>>>
>>>> Sub ProcessOnChildFocus(windowObject)
>>>> ' React to OnChildFocus events
>>>> End Sub
>>>>
>>>> Sub ProcessOnShutdown()
>>>> ' Disconnect events and any other cleanup procedures required.
>>>> End Sub
>>>>
>>>> Hth,
>>>> Tom
>>>>
>>>> ----- Original Message ----- From: "Sean Farrow" 
>>>> <[EMAIL PROTECTED]>
>>>>
>>>>
>>>> Hi:
>>>> Are there currently any scripts using the onshutdown event. I
carn't
>>>> seem to get it to work.
>>>> Should I be using
>>>> Sub ClientInformation.OnShutdown()
>>>> Or sub OnShutdown()
>>>> Do I need to connect to this event as per normal?
>>>> Cheers
>>>>  Sean.
>>>>
>>>> -----Original Message-----
>>>> From: Aaron Smith [mailto:[EMAIL PROTECTED]
>>>> Sent: 02 August 2008 15:14
>>>> To: [email protected]
>>>> Subject: Re: Client.OnShutdown query
>>>>
>>>> Sean,
>>>>
>>>> OnShutdown is only fired when the application that launched the
>> script
>>>> is closing, or the case of a global script, when Window-Eyes is
>>> closing.
>>>> Aaron
>>>>
>>>> Sean Farrow wrote:
>>>>> Hi:
>>>>> When is the client.OnShutdown event called, I understand this is
>>>> called
>>>>> when an application closes, is it also called when an application
>>>> loses
>>>>> focus?
>>>>> Cheers
>>>>> Sean.
>>>>> Sean
>>>>>
>>>>>
>>>>> __________ Information from ESET NOD32 Antivirus, version of virus
>>>>> signature database 3318 (20080801) __________
>>>>>
>>>>> The message was checked by ESET NOD32 Antivirus.
>>>>>
>>>>> http://www.eset.com
>>>>>
>>>>>
>>
>

-- 
Doug Geoffray
GW Micro, Inc.
Voice 260-489-3671
Fax 260-489-2608
http://www.gwmicro.com

Reply via email to