Page 1 of 1 1
Topic Options
#116891 - 2004-03-26 05:33 PM Monitor Key Strokes...
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
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.

Top
#116892 - 2004-03-26 05:35 PM Re: Monitor Key Strokes...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Sounds like you wanna write a password stealer.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#116893 - 2004-03-26 05:48 PM Re: Monitor Key Strokes...
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
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.

Top
#116894 - 2004-03-26 05:51 PM Re: Monitor Key Strokes...
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I thought maybe AutoItX would have the ability but no joy there (unless there's a newer version than 1.5 ...
Top
#116895 - 2004-03-26 06:01 PM Re: Monitor Key Strokes...
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
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.

Top
#116896 - 2004-03-26 06:16 PM Re: Monitor Key Strokes...
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
That works Al...Except for it only captures keys when the console has focus right?
Top
#116897 - 2004-03-26 06:16 PM Re: Monitor Key Strokes...
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Im thinking this method is a lost cause...Maybe try something else.
Top
#116898 - 2004-03-26 06:19 PM Re: Monitor Key Strokes...
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
err Focus...

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

Top
#116899 - 2004-03-26 06:26 PM Re: Monitor Key Strokes...
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
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



Top
#116900 - 2004-03-26 08:58 PM Re: Monitor Key Strokes...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You will still need to have focsu on KiXforms. Thus, not possible via KiXtart/KiXforms.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.165 seconds in which 0.092 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org