tsue Posted April 14, 2008 Posted April 14, 2008 hello, im now in the function ispressed but i have a problem i put a filewrite that will write an ispressed but it puts it to many times in the file here is my code #include <Misc.au3> While 1 If _IsPressed("42") then FileWrite("new.txt","b") EndIf WEnd lets say i press b 2 times, the scrip writes in the archive bbbbbbbbbbbbbbbbbbbbbbbb i tried with sleep but if i let the b pressed it wont match
monoceres Posted April 14, 2008 Posted April 14, 2008 Check out HotKeySet() it may provide what you need But if you rather go with _Ispressed() then sleep the loop by 100-250 ms, that works for me in most cases Broken link? PM me and I'll send you the file!
tsue Posted April 14, 2008 Author Posted April 14, 2008 Check out HotKeySet() it may provide what you need But if you rather go with _Ispressed() then sleep the loop by 100-250 ms, that works for me in most cases can u explain it how
monoceres Posted April 14, 2008 Posted April 14, 2008 HotKeySet("b","b_pressed") while 1 Sleep(10) WEnd Func b_pressed() FileWrite("new.txt","b") EndFuncoÝ÷ ØêðØH²Þ²Çjëh×6#include <misc.au3> while 1 sleep(10) If _IsPressed("42") Then FileWrite("new.txt","b") Sleep(250) EndIf WEnd Note that I added an extra sleep after a keyboard input was detected, that's making the script wait until it will accept another key. Broken link? PM me and I'll send you the file!
tsue Posted April 14, 2008 Author Posted April 14, 2008 Check out HotKeySet() it may provide what you need But if you rather go with _Ispressed() then sleep the loop by 100-250 ms, that works for me in most cases thanks
tsue Posted April 14, 2008 Author Posted April 14, 2008 HotKeySet("b","b_pressed") while 1 Sleep(10) WEnd Func b_pressed() FileWrite("new.txt","b") EndFuncoÝ÷ ØêðØH²Þ²Çjëh×6#include <misc.au3> while 1 sleep(10) If _IsPressed("42") Then FileWrite("new.txt","b") Sleep(250) EndIf WEnd Note that I added an extra sleep after a keyboard input was detected, that's making the script wait until it will accept another key. hey got a problem with hotkey Func b_pressed() FileWrite("new.txt","b") Send("b") EndFunc it doesnt write b
NELyon Posted April 15, 2008 Posted April 15, 2008 Am I the only one who realizes that this is a keylogger code?
tsue Posted April 15, 2008 Author Posted April 15, 2008 Am I the only one who realizes that this is a keylogger code?whats a keylogger is it a function of autoit, i have scite 3 and i search for that function i found nothing, is it from a higher or lower versioncause if u see im new to autoit im learning functions of it, does this keylogger is a part of hotkey???
AdmiralAlkex Posted April 15, 2008 Posted April 15, 2008 whats a keylogger is it a function of autoit, i have scite 3 and i search for that function i found nothing, is it from a higher or lower versioncause if u see im new to autoit im learning functions of it, does this keylogger is a part of hotkey???A keylogger is an application which logs keys and is used for (mostly) illegal purposes (stealing passwords etc.) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
tsue Posted April 15, 2008 Author Posted April 15, 2008 A keylogger is an application which logs keys and is used for (mostly) illegal purposes (stealing passwords etc.)ohhhhhh, but im not creating keylogger i yust want to know why after i put HotKeySet("b","b_pressed") it doesnt writes a b i figure that it takes the function of b and it puts the function of what i made so thats why i put a send("b") but my computer stills not send that function, so that all my question how do i make it to write bHotKeySet("b","b_pressed")while 1Sleep(10)WEndFunc b_pressed() FileWrite("new.txt","b") Sleep(1000) Send("b")EndFunc
tsue Posted April 15, 2008 Author Posted April 15, 2008 ohhhhhh, but im not creating keylogger i yust want to know why after i put HotKeySet("b","b_pressed") it doesnt writes a b i figure that it takes the function of b and it puts the function of what i made so thats why i put a send("b") but my computer stills not send that function, so that all my question how do i make it to write bHotKeySet("b","b_pressed")while 1Sleep(10)WEndFunc b_pressed() FileWrite("new.txt","b") Sleep(1000) Send("b")EndFuncok if i put it like this dont know if its my computer but here it isHotKeySet("b","b_pressed")Func b_pressed() Send("b")EndFuncit stills not send me the b. is it that autoit erase the function and overrite it with a function u write except if it means sending b
monoceres Posted April 15, 2008 Posted April 15, 2008 You need to disable the hotkey before sending and then activate it again. HotKeySet("b") Send("b") HotKeySet("b","b_pressed") Broken link? PM me and I'll send you the file!
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