sjorrel Posted June 23, 2006 Share Posted June 23, 2006 I know that you can use _IsPressed() to determine if a particular key has been pressed, but is there a function to determine what key is currently being pressed? Link to comment Share on other sites More sharing options...
Valuater Posted June 23, 2006 Share Posted June 23, 2006 While 1 If _IsPressed(11) Then; the control key is #11 While _IsPressed(11) Beep(1000, 100) WEnd EndIf WEnd Func _IsPressed($hexKey) Local $aR, $bO $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then $bO = 1 Else $bO = 0 EndIf Return $bO EndFunc ;==>_IsPressed 8) Link to comment Share on other sites More sharing options...
sjorrel Posted June 23, 2006 Author Share Posted June 23, 2006 Hmm thanks for the reply, but I already know about _IsPressed(). Maybe I'm being a bit thick, but doesn't that script just beep if the control key is pressed? I want a function that will return what key is being pressed, not check for one key in particular. Link to comment Share on other sites More sharing options...
Simucal Posted June 23, 2006 Share Posted June 23, 2006 Hmm thanks for the reply, but I already know about _IsPressed(). Maybe I'm being a bit thick, but doesn't that script just beep if the control key is pressed?I want a function that will return what key is being pressed, not check for one key in particular.What is this for? AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
sjorrel Posted June 23, 2006 Author Share Posted June 23, 2006 What is this for?On another forum I visit somebody was asking if there was any typewriter style software that would force them to write better - i.e. only allowing you to type characters, shift, space and not deleting or using special characters. Something similar to Blockwriter on the Mac.I was trying to come up with something, and I was hoping to create a read-only edit box. I want to know if theres a way of getting the value of a key pressed which could then be checked to see if it is 'typewriter valid', play a sound and add it to the edit box.No, not a keylogger, if that's what you're thinking! Link to comment Share on other sites More sharing options...
Paulie Posted June 23, 2006 Share Posted June 23, 2006 No, not a keylogger, if that's what you're thinking!Technically, it logs keys, therefore it is a key-logger, the question is whether or not it is a malicious one, post your code, and you'll probably get more help Link to comment Share on other sites More sharing options...
sjorrel Posted June 23, 2006 Author Share Posted June 23, 2006 Technically, it logs keys, therefore it is a key-logger, the question is whether or not it is a malicious one, post your code, and you'll probably get more helpThat's a silly thing to say. Are you saying any GUI control that accepts text entry is a 'key logger'? Link to comment Share on other sites More sharing options...
Skruge Posted June 23, 2006 Share Posted June 23, 2006 How about...HotKeySet("{BACKSPACE}", "_DoNothing") HotKeySet("{LEFT}", "_DoNothing") HotKeySet("{RIGHT}", "_DoNothing") ; etc... ; ... GUI Code ... Func _DoNothing() Beep() EndFunc ;==>_DoNothing [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 23, 2006 Moderators Share Posted June 23, 2006 That's a silly thing to say. Are you saying any GUI control that accepts text entry is a 'key logger'?Only the ones that record them .... Keyloggers can be useful in debugging, can be useful in alot of things, but maliciousness over the past has ruined this forum to determine the "good" from the "bad". Publicly post for the "good" and the "bad" will find it anyway.I'm sure it's nothing against you personally, It's just you won't find much help on that subject or "related" subjects that could be turned into said subject (Damn that was confusing). GoogleDude 1 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Wacksoff Posted June 23, 2006 Share Posted June 23, 2006 (edited) So if i buy a cd burner and burn songs i bought and "legally" own to disk so i can play the songs in my car while i drive to work i guess thats illegal and i should go to prison.. maybe we should emphasize what keylogging meansKeylogger: A computer program that captures the keystrokes of a computer user and stores them. Modern keyloggers can store additional information, such as images of the user’s screen. Most malicious keyloggers send this data to a third party remotely (such as via email).Keylogger:Keystroke logging is a diagnostic used in software development that captures the user's keystrokes. It can be useful to determine sources of error in computer systems. Such systems are also highly useful for law enforcement and espionage – for instance, providing a means to obtain passwords or encryption keys and thus bypassing other security measures. Edited June 23, 2006 by Wacksoff Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted June 23, 2006 Share Posted June 23, 2006 (edited) BOREDOM expandcollapse popup#include <GUIConstants.au3> Global $cheat = 0 Global $m[5] $m[0] = "ttttttuhhhhhh type it yoooo" $m[1] = "tttttttypeee it" $m[2] = "donnnnnt type it" $m[3] = "eeeeeee cat in the crat smat" $m[4] = "lil boy bue and duh mans in the spoon?" $GUI = GUICreate("SUPER TYPER DONT SCREW UP", 364, 204, 331, 401) $edit = GUICtrlCreateEdit("", 8, 32, 289, 153, -1, $WS_EX_CLIENTEDGE) GUICtrlCreateLabel("Type This :", 8, 8, 57, 17) $message = GUICtrlCreateLabel("message to type is this message", 80, 8, 155, 17) $reset = GUICtrlCreateButton("Reset", 312, 48, 41, 113) GUISetState(@SW_SHOW) While 1 Quit() Reset() HotKeySet("{Backspace}","cheater") HotKeySet("{Up}","cheater") HotKeySet("{Down}","cheater") HotKeySet("{Left}","cheater") HotKeySet("{Right}","cheater") If GUICtrlRead($edit) = GUICtrlRead($message) Then New() EndIf WEnd Func cheater() $cheat += 1 MsgBox(0,"CHEATER","Why dont you go eat some cheetos you freaking cheater, run to safeway and buy them, you'll get there fast cuz ur a cheata") EndFunc Func Quit() $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE then Exit EndFunc Func Reset() $msg = GUIGetMsg() If $msg = $reset Then GUICtrlSetData($edit,"") EndIf EndFunc Func New() GUICtrlSetData($message,$m[Random(0,4,1)]) GUICtrlSetData($edit,"") EndFunc Edited June 23, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Simucal Posted June 24, 2006 Share Posted June 24, 2006 So if i buy a cd burner and burn songs i bought and "legally" own to disk so i can play the songs in my car while i drive to work i guess thats illegal and i should go to prison.. maybe we should emphasize what keylogging meansKeylogger: A computer program that captures the keystrokes of a computer user and stores them. Modern keyloggers can store additional information, such as images of the users screen. Most malicious keyloggers send this data to a third party remotely (such as via email).Keylogger:Keystroke logging is a diagnostic used in software development that captures the user's keystrokes. It can be useful to determine sources of error in computer systems. Such systems are also highly useful for law enforcement and espionage for instance, providing a means to obtain passwords or encryption keys and thus bypassing other security measures.Wacksoff, ask yourself this. Regardless of whether or not he specifically wants something that captures the keystrokes of a computer user and stores them., how trivial would it be for someone to take a script which captures keystrokes and does NOT store them.. and add in 1-2 lines of code and make it so it does. It seems you have missed the point. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Wacksoff Posted June 24, 2006 Share Posted June 24, 2006 k.. the whole point was anyone can take something and turn into something else more over something evil like a keylogger. Link to comment Share on other sites More sharing options...
JohnOne Posted August 25, 2009 Share Posted August 25, 2009 I find notepad to be very useful in returning the value of keys pressed, right there on the screen too. It can also store them save as "name.txt" Sorry AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
CodyBarrett Posted August 26, 2009 Share Posted August 26, 2009 didnt this topic start out as a questions refering to the basic funtionality of _ispressed () and now its turned into a Keylogger questionaire [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now