` Printed Icetips Article

Icetips Article



Windows API: Detecting keystrokes using SetWindowsHookExe
2003-04-11 -- Robert Rodgers
 
Newsgroups: softvelocity.products.c55ee


Hi Simon,

You need a system wide (or global) keyboard hook.

SetWindowsHookEx

See http://www.attryde.com/clarion/col_msgfltr.htm

for some general information.

rob

--
"The average person thinks he isn't."
Larry Lorenzoni
++++++++++++++++++++++++++++++

"Simon Burrows"  wrote in message
news:3e967595@news.softvelocity.com...
> I have a need to be able to detect when somebody has typed in a particular
> phrase in another non Clarion app.  This could be any app, so I can't be
> specific and use OLE to Word or anything like that.
>
> So for example, somebody could be in Notepad and type in Solace and I need
> to be able to detect that.  The actual mechanics of putting the phrase
> together is not a problem, but it is detecting keystrokes that users have
> typed into other apps that I need to look for.  In other words I want to
be
> able to read all keystrokes regardless of what application has focus.
>
> Anyone got any ideas how to do this?  I am almost certain that it will not
> be available in the Clarion language as I have tried running a simple
source
> program with no Window which loops round looking at Keyboard() but and
that
> does not do anything when another app has focus.
>
> Cheers
> Simon Burrows
> MailMerge Templates - Add mailmerging facilities to your apps
> VariView templates. - Display your variables and fields as you run your
> application
> WordSpell templates. - Seamlessly use MS Word's Spell checker in your
apps.
> Layout Manager templates - Let your customers change your screen layouts
> and control properties to suit their needs at runtime.
> List & Label Templates - Unlimited report layouts, defined by your user at
> runtime in your Clarion application
> Free template sets
> http://www.solace-software.demon.co.uk
>
>



Printed November 21, 2024, 7:04 am
This article has been viewed/printed 35317 times.
Google search has resulted in 70 hits on this article since January 25, 2004.