Hi Bruce,

I had sent you a message on your bronx lab address last night, but it's not important now. I have been monkeying around with the app for almost a day now, and you're quite right about it having timing issues. I'm still working on it, and I just want to say thanks for all your help.

Take care,

Rod

On 4/24/14 2:51 PM, LB wrote:
Hi Rod,

     I forgot to mention, the Control-Shift-3 toggles the program from on to 
off so those 2 speech lines must remain so a person knows there monitoring the 
keyboard.

     I felt this was the best way to run the program, toggle it on and when not 
needed, toggle it off. Of course it is off when Windoweyes is loaded and only 
on for the window you are on when the hotkey is hit.
     Even though the timer is always reset when a key is up, it might cause 
problems for timing issues some times.
         Bruce

Sent: Wednesday, April 23, 2014 8:43 PM
Subject: Re: An app which prevents merchant service logout


Hi Rod,

     There are a lot of things in this app that should not be there. Most are 
for debugging and see if event handling was done correctly.

     You can take out all the speaking and such, or just comment them out. I 
left the all keys up in just in case it is needed, but is not.

     So the only thing that is in my app I sent you is it is triggered using 
Control-Shift-3 and not 4. that was in conflict with another app so 3 had to be 
used.

     You can use any key you want to trigger a key event for the person who 
wants or needs such a thing. What ever works can be used. This can open and 
close a tree view or move back and forth in an editbox, or text...

     So test it, have fun with it, and I think it should work for what you 
needed.

         Bruce

Sent: Wednesday, April 23, 2014 3:57 PM
Subject: Re: An app which prevents merchant service logout


Hi Bruce,

I noticed that the line containing Keyboard.WaitForAllKeysUp is still
commented out; is this your intention?

Thanks,

Rod

On 4/23/14 3:28 PM, LB wrote:
Hi Rod,

      Here is the entire program to allow you to set the timer for a given 
window. I activate this using a hotkey such as Control-Shift-3 keys.
I can send you the entire package I made to you instead of uploading the app to 
app central, but maybe I will do that for those who may want it.
    You have to change the time to the desired time you want. I placed it at 15 
seconds here  or .25 minutes as shown below. I did this for testing and you can 
install this app and test it to see what I have done.
i use the left and right arrow to trigger and it only does it in the window you 
had first set the app running.
      The insert key requires 2 key values so if no modifiers just put kmNone 
as I have done.

      I will also zip up the entire app, including the .xml and let you try it 
out.

          Bruce

Entire App:
Dim oKeyActiveWindow: set oKeyActiveWindow = Nothing
Dim oKeyActiveChildren: Set oKeyActiveChildren = Nothing
Dim myKeyboard: Set myKeyboard = Keyboard
     Dim globalTimer: globaltimer = 0
     Dim globaltimerVal: globalTimerVal = .25 'Minutes
Dim myKeyboardConnection: myKeyboardConnection = 0

'Initial setting of timer.
'    my_KeyUpConnection = ConnectEvent( Keyboard, "OnKeyProcessedUp", 
"OnKeyProcessedUp")

Sub Key_Monitoring( myKeyId)
   'This routine is called when the hotkey Control-Shift-4 is pressed.
   If Keyboard.KeyDescriberActive Then
    Speak myStrings(myKeyId & "_Description")
   Else
    'Main routine functionality goes here
    Queue "Activate_Monitoring"
   End If
End Sub

Sub Activate_Monitoring()
   'Assumes present program when hotkey is hit is the active application for 
monitoring.
   If myKeyboardConnection = 0 Then
    set oKeyActiveWindow = activeWindow.overlap
    ' Filter keyboard events for only this process
'  myKeyboard.FilterProcess = oKeyActiveWindow.Process
    On Error GoTo 0
    ' handle all MSAA event types
    myKeyboardConnection = ConnectEvent( Keyboard, "OnKeyProcessedUp", 
"MonitoringKeyUp")
    Silence
    Speak " Keyboard Monitoring Is Turned On! "
    Sleep 1000
     ResetTimer globalTimerVal
   Else
    Disconnect myKeyboardConnection
    myKeyboardConnection = 0
    On Error Resume Next
    If globaltimer  > 0 Then
     StopTimer globalTimer
     globalTimer = 0
    End If
    Set oKeyActiveWindow = Nothing
    Silence
    Speak " Keyboard Monitoring Is Shut Off! "
    Sleep 1000
   End If
End Sub

Sub MonitoringKeyUp( ky, km)
      'Key up was processed.
   If oKeyActiveWindow.Handle = activeWindow.overlap.Handle Then
    Silence
    Speak " Key Is Up "
    Sleep 1000
    Queue "ResetTimer", globalTimerVal
   End If
End Sub

Sub ResetTimer( ByVal timerVal)
   If globaltimer  > 0 Then
    StopTimer globalTimer
    globalTimer = 0
   End If
   ' Convert time to milliseconds.
   timerVal = timerVal * 60 * 1000
   globalTimer = StartTimer( timerVal, "DoTab" )
   Speak " Timer Is Set "
   Sleep 1000
End Sub

Sub DoTab()
   If oKeyActiveWindow.Handle = activeWindow.overlap.Handle Then
    'Keyboard.WaitForAllKeysUp()
    Keyboard.InsertKey vk_Right, kmNone
    Sleep 2000
    Keyboard.InsertKey vk_Left, kmNone 'kmShift
    Sleep 2000
   End If
    ResetTimer globalTimerVal
End Sub


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com




---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com




Reply via email to