IKilledBambi Posted November 19, 2008 Share Posted November 19, 2008 Ok so, I'm trying to make _IsPressed more efficient because if I just tap the key it doesn't register that I pressed it. And if I hold it for even a little it sends the command a bunch of times. This wouldn't normally be a problem but I'm trying to make it for sites that I go to. I always forget my password to sites. So I'm making it so that if I type in autoitscript it will go to autoitscript it will go to autoitscript.com and log me in automatically, I'm getting good enough at autoit to do all of that except the _IsPressed, it doesn't register it half the time and spams as mentioned above. Thanks. ~IKilledBambi Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 19, 2008 Share Posted November 19, 2008 Larry has already improved on this. There is a hook version he has made. Look for posts by LarryDalooza containing "hook" or "key hook". Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
IKilledBambi Posted November 19, 2008 Author Share Posted November 19, 2008 Thanks alot! I LOVE YOU LARRYYYY!!! Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 19, 2008 Share Posted November 19, 2008 If you have found the afore-mentioned post could you share the link so others can find it easier (and save me from having to repeat this information)? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
IKilledBambi Posted November 19, 2008 Author Share Posted November 19, 2008 (edited) Still looking but I will get back to you and edit this post but I already had that thought in mind. EDIT* I think this might be it.http://www.autoitscript.com/forum/index.ph...958&hl=hook Edited November 19, 2008 by IKilledBambi Link to comment Share on other sites More sharing options...
Aceguy Posted November 19, 2008 Share Posted November 19, 2008 im interested in this script..... but when i searched for it, i did come up with the results but when i ran the example i got an error in the Dllcallback.au3 with @unicode not being a reconised macro. will be keeping an eye on this as _ispressed is used alot in my scripts, and is sometimes a pain in the [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
IKilledBambi Posted November 19, 2008 Author Share Posted November 19, 2008 Works fine for me, two things to check, is you hook.dll in the same folder as your script? Are you using an updated autoit?(I didn't test with beta.) Link to comment Share on other sites More sharing options...
ResNullius Posted November 20, 2008 Share Posted November 20, 2008 Ok so, I'm trying to make _IsPressed more efficient because if I just tap the key it doesn't register that I pressed it. And if I hold it for even a little it sends the command a bunch of times. This wouldn't normally be a problem but I'm trying to make it for sites that I go to. I always forget my password to sites. So I'm making it so that if I type in autoitscript it will go to autoitscript it will go to autoitscript.com and log me in automatically, I'm getting good enough at autoit to do all of that except the _IsPressed, it doesn't register it half the time and spams as mentioned above. Thanks. ~IKilledBambiCan't help you with the tap not registering, but if you want to prevent the key "spamming" of _IsPressed() without resorting to adding a non-system dll (like Larry's hook) then you just need something to check for when a key is pressed and then released. A simple While loop in conjuction with _IsPressed works perfectly well for me: #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 _keyPress() Sleep(100) WEnd Func _KeyPress() If _IsPressed("41", $dll) OR _IsPressed("61") Then; check for "A" or "a" ToolTip(' "A" key is down') While _IsPressed("41", $dll) Or _IsPressed("61", $dll) Sleep(10) WEnd ToolTip(' "A" key is up') EndIf If _IsPressed("1B",$dll) Then;if "ESC" is pressed, then exit the script DllClose($dll) Exit EndIf EndFunc 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