Log in

View Full Version : Background mode again


kate_ques
Apr 6, 2005, 06:42 AM
Well,
I want to write Typing Assistant programming which help you in typing in other applications.For instance,when you are typing 'boo',the program will show you the word beginning with 'boo' at the highest probability(for example,'book').Because I need the program help you in the others,I need it run in background mode automatically.I may program in C/MFC/API.can you help me by showing me how to make an application run in background mode?

ScottGem
Apr 6, 2005, 09:41 AM
Ahh, now I see what you need. What you have to do is capture the keystrokes BEFORE they get to the application so they can be analyzed and the alternatives offered. This is not "running in the background". As I said previously, Windows is a multi-tasking OS, so any program that is loaded into memory is running.

Again, I'm not a coder so I can't tell you how to do it, but I can tell you what you need to do. What you need is to access the API that receives keystrokes from the keyboard. You need to read those keystrokes into your program and then pass them to the active application. You need to add each new keystroke to the previous and compare them to your dictionary to see if there is a match then present the matches to the user. You will also need to check for selection of a choice or a space being input to clear the current buffer and start a new word.

I really doubt if you will get much help with the actual coding here. Not sure how many coders are here. I would also ask in forums that support the languages you want to work in. But at least now you can ask for the correct procedure (how to intercept keystrokes).

One more point, if you have a follow-up question, please use the Repy option rather then starting a new note. It helps to keep the thread together.