Hi Rod, Before commenting on what you did I decided tonight to add more key functions into my Breaking News app so you can also read the history you are on, move through the history list and see what is there without loading each, and even delete history spots, along with alerting you if you are at the end or start of the history list; all using the arrow keys when in the control panels, Alert, List, and Editbox...for reading. I now added CtrlLeft, CtrlRight, CtrlUp, and CtrlDown with CtrlShiftUp Arrow to delete a history URL.
About your app: Yes, what you did is what I hoped you would do. I sent you something that only works in one given window and it was the reason why I wrote it that way. I just wanted to make sure you did not get a key stroke in some other app which would mess you up or the person who wanted it would mess up. I guess you could add that window handle to the app for enhanced security just like I did, making sure only the window you are in is doing the key stroke. Also, I wanted a normal key stroke and not a windoweyes key stroke so I chose a standard keyboard key and not the reading of the title Bar. but, as long as it works for you that is OK with me, I just added more precautions in the one I gave you. but, as I said, when activating it with the hotkey, you can capture the window you are in and just add an if statement inside the set time function so it gets bypassed when not in the window you want. but, having said that you would also have to focus to that window, have the key stroke perform, then go back to the window you are in. Which brings up another feature, monitor the window handle to see if a key stroke only happens in the window being monitored...lots of ideas for a simple app. that is if you really want a nice working, 1 window, key stroke... As long as it works then wait and see if you do in fact need to monitor windows. Bruce Sent: Friday, April 25, 2014 4:23 PM Subject: Re: An app which prevents merchant service logout Hi Bruce, Yes, I caught that. Thanks. smile After all your work, and my trying to get the app to behave reliably, it turned out for me that my initial inspiration of how to write the app won the day. Here is a link to my package on my DropBox: https://www.dropbox.com/s/xvrb1gqbl3j0bgs/KeyboardActivity.wepm It works, it's safe, and it does the job. See if you agree. smile All the best, Rod On 4/25/14 3:20 PM, LB wrote: > Dim globaltimerVal: globalTimerVal = .25 'Minutes > Rod, > > This value I had placed there should be changed either to 10 or 15 > instead of .25 to make sure you wait 10 minutes or more or what you want to > have as the delay. > At the moment it will go off in around 15 seconds because it is .25 and I am > not sure if that is what you were talking about. > You can also add a menu, placing an option to change the time to what > you want. Or just add a radio box with minute values in it so you can change > it. Adding a second hotkey to make the change and get stored in the .ini file. > I did not do that but could to make it run easier. Just have been > running around and not been on the computer long except to upload the 2.6 > version of Breaking News. > > As always, when someone does a review they give low marks. But since my > Breaking News app is a work in progress and lots of it will be taken out as I > refine it, I have to live with such reviews. As always, try not to take > attempts in helping others personal. > > Bruce > > > Sent: Thursday, April 24, 2014 4:08 PM > Subject: Re: An app which prevents merchant service logout > > > 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 >> >> >> > > --- > 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