XxXFaNtA Posted March 8, 2006 Posted March 8, 2006 Hi Everybody I tried making a small script, that recognices if someone hits "ENTER" and then sends Send("Test{enter}")Now the Problem:I tried it with Hotkeys:HotKeySet("{ENTER}", "Enterhit")While 1 Sleep(100)WEndFunc Enterhit() Send("Test{enter}")EndFuncThat didn't work because it's an endless-loop (when i hit enter, it sends the text and hits enter and so on ...)So i tried _isPressed...The only Problem about _isPressed is, that it doesn't "catch" the enter...i dont won't the first enter to be send :\Is there a way to do that? /[center][/center]
Fossil Rock Posted March 8, 2006 Posted March 8, 2006 Sounds like you want to remap the enter key. Then watch for the key it's being remapped to. Sorry I don't have any code to show you. Agreement is not necessary - thinking for one's self is!
cdkid Posted March 8, 2006 Posted March 8, 2006 HotKeySet("{ENTER}","enterfunc") While 1 sleep(10000) WEnd func enterfunc() hotkeyset("{ENTER}") Send("Test{ENTER}") hotkeyset("{ENTER}","enterfunc") endfunc --that ought to do it ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
CyberSlug Posted March 8, 2006 Posted March 8, 2006 Straight from the documentation for HotKeySet:If you wish to send the captured hotkey to the active application you must unregister the hotkey before invoking Send or must use ControlSend:; capture and pass along a keypressHotKeySet("{Esc}", "captureEsc")Func captureEsc() ; ... can do stuff here HotKeySet("{Esc}") Send("{Esc}") HotKeySet("{Esc}", "captureEsc")EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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