Hi Rick,

    Steve had a good question on this but what I think you are saying may be 
the result of the program you are trying to control. For the events you are 
asking are related to that program, unless you want to do it at the other end. 
So you actually may have answered your own question.

    If the other program is not triggering the other event, then it will not be 
seen. I guess you could monitor it and do it yourself to get around the no 
keyup event process of the command you want.

    This below is for event info data and when that is available for an object 
in the call back function.

        Sincerely
        Bruce

  Sent: Wednesday, May 23, 2012 10:50 AM
  Subject: Re: KeyProcessedUp and KeyProcessedDown Events



  Hi Rick,

      This is a tree view item but I think all key processes are the same but 
may be wrong.

      I capture the event change, store the data of the event which submitted 
the data. Waited until the key processed event to insure that the data may or 
should be related to the key in question. 

      This is what I did inside the Trek game. I have extra stuff there from 
the Uninstall program because in the future I may allow people to store 
information in the game...

          Bruce

   MainDialogProc = False
   If dEvent = treeviewKeyDown Then
    TV_KeyDown = True
    myTV_KeyConnection = ConnectEvent( Keyboard, "OnKeyProcessedUp", 
"OnKeyProcessedUp")
   End If
   If dEvent = treeviewClicked Then
    TV_MouseDown = True
    myTV_MouseConnection = ConnectEvent( Mouse, "OnButtonUp", "OnButtonUp")
   End If
   If dEvent = treeviewSelectionChange Or dEvent = treeviewClicked Then 'Or 
dEvent = treeviewItemExpanded Then
    Set TV_Obj = dControl.selected
    Set TV_ObjControl = dControl
    TV_Name = TV_Obj.Text
    TV_Data = TV_Obj.Data
    TV_Array(1) = TV_Data
  ...
  End Function

  Sub OnKeyProcessedUp( ky, md)
   Disconnect myTV_KeyConnection
   myTV_KeyConnection = 0
   If TV_KeyDown and ky = vk_Space and md = 0 Then
    Silence
  '  Speak " Name Is: " & TV_Name & " Item " & TV_Data & " Whose Item Was Space 
Barred "
    If treeNamesDict.Exists( TV_Name) Then Speak treeNamesDict( TV_Name)
    Queue "LaunchURLEmail"
   End If
   TV_KeyDown = False
  End Sub

  Sub OnButtonUp( button)
   Disconnect myTV_MouseConnection
   myTV_MouseConnection = 0
   If TV_MouseDown and button = 0 Then
  '  Speak " Name Is: " & TV_Name & " Item " & TV_Data & " Whose Item Was Mouse 
Clicked "
    If treeNamesDict.Exists( TV_Name) Then Speak treeNamesDict( TV_Name), 2
    Queue "LaunchURLEmail"
   End If
   TV_MouseDown = False
  End Sub

Reply via email to