ShaneEP
(MM club member)
2004-03-26 05:33 PM
Monitor Key Strokes...

Is there any way to have a kix script running and to be able to have it intercept keystrokes? Or would the script have to have focus? Like if I have a list of keywords and if one of those keywords was detected as being typed the script would then do something...

Is this even currently possible?

Just an idea I had.


Les
(KiX Master)
2004-03-26 05:35 PM
Re: Monitor Key Strokes...

Sounds like you wanna write a password stealer.

ShaneEP
(MM club member)
2004-03-26 05:48 PM
Re: Monitor Key Strokes...

No....It really isnt for that. Was trying to write one of those progs that will scroll messages in chat rooms. Usually very annoying I know...But I was bored lastnight. Was just wondering if it was possible. Would build a kixforms app so you could define a keyword and a text string for that keyword so that if you type one of the keywords it would automagically replace the keyword with the text that is assigned to it.

Kind of the same as the program found here...

Shortkeys Lite

Probably not too useful for most people...But like I said...Was just looking for a new challenge.


ShawnAdministrator
(KiX Supporter)
2004-03-26 05:51 PM
Re: Monitor Key Strokes...

I thought maybe AutoItX would have the ability but no joy there (unless there's a newer version than 1.5 ...

AllenAdministrator
(KiX Supporter)
2004-03-26 06:01 PM
Re: Monitor Key Strokes...

Here's an idea...

Code:
 
break on
while len($str)<5
if kbhit()
get $
endif
$str=$str+$
sleep 0.2
loop

? $str



Obviously you would need more than this, but this does record key strokes.


ShaneEP
(MM club member)
2004-03-26 06:16 PM
Re: Monitor Key Strokes...

That works Al...Except for it only captures keys when the console has focus right?

ShaneEP
(MM club member)
2004-03-26 06:16 PM
Re: Monitor Key Strokes...

Im thinking this method is a lost cause...Maybe try something else.

AllenAdministrator
(KiX Supporter)
2004-03-26 06:19 PM
Re: Monitor Key Strokes...

err Focus...

Good point... you're right... doesn't work. Oh well.


Bryce
(KiX Supporter)
2004-03-26 06:26 PM
Re: Monitor Key Strokes...

Having written similar type of program... i was unable to find of a way to watch keyboard strokes from a kix script (unless the kix script had focus and that is what alpo's code would need)

I thought that one of the latest versions of kixforms had a new KB button press feature? or does that only work with program focus too? .KeyPreview??

My app that i wrote would wait until a /command was typed and perform actions based off of that.. some really nice stuff http://jumpgate.isorg.com/jgrot-script but i had to proxy my program onto another program to get the keyboard hooks. As for display, i used autoit to write my output to the target window, or used the proxy program's own addon support to display information. if you get interested, DL the file from the website and take a gander at the source code!

Bryce




Sealeopard
(KiX Master)
2004-03-26 08:58 PM
Re: Monitor Key Strokes...

You will still need to have focsu on KiXforms. Thus, not possible via KiXtart/KiXforms.