Hyflex Posted November 19, 2006 Share Posted November 19, 2006 Ok I cant find anywhere on the help files/online documentation on how to do the following i want it so when i press up it to do something once, and if i hold up for it to constantly do it.. and same with all of the other directions So for instance If i press Up i want it to press W and then A, and if i hold Up for it to keep doing w and then a.... Link to comment Share on other sites More sharing options...
Valuater Posted November 19, 2006 Share Posted November 19, 2006 If _IsPressed() Send() Send() While _IsPressed() Send() Send() Wend Endif 8) Link to comment Share on other sites More sharing options...
Hyflex Posted November 19, 2006 Author Share Posted November 19, 2006 so with 4 differnt things it would look like... Cos i dont understand that.. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 19, 2006 Share Posted November 19, 2006 (edited) read the help file, if you simply type in IsPressed its magical what comes up , and if you type in Send wow magical again what do u mean by 4 different things? see if you want help you must be to the point Edited November 19, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Hyflex Posted November 19, 2006 Author Share Posted November 19, 2006 Yah, im not best explainer.. When i press W i want it to do: Press w, Press w, Press space, Press CTRL, Press Shift. IF i hold W and not let go i want it to do it repeatedly. Same Code above for a, s and d but the first two combinations would go with whats pressed.. so if A pressed it would be: Press a, Press a, Press space, Press CTRL, Press Shift. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 19, 2006 Share Posted November 19, 2006 with simple reading of the helpfile at IsPressed you'll see what to put in, and send you'll see what to put in as well Link to comment Share on other sites More sharing options...
Valuater Posted November 19, 2006 Share Posted November 19, 2006 You try we help! show us your effort so we can help direct you .... try to write something... check out _IsPressed first 8) Link to comment Share on other sites More sharing options...
Hyflex Posted November 19, 2006 Author Share Posted November 19, 2006 i cant find it in the Help.. i duno if im getting the rigt help thing up.. Link to comment Share on other sites More sharing options...
Valuater Posted November 19, 2006 Share Posted November 19, 2006 Function Reference_IsPressed Check if key has been pressed #Include <Misc.au3>_IsPressed($s_hexKey[, $v_dll = 'user32.dll']) Parameters $s_hexKey key to check for $v_dll Optional: Handle to dll or default to user32.dll Return Value Success: Returns 1 if true. Failure: Returns 0 if false. Remarks 01 Left mouse button 02 Right mouse button 04 Middle mouse button (three-button mouse) 05 Windows 2000/XP: X1 mouse button 06 Windows 2000/XP: X2 mouse button 08 BACKSPACE key 09 TAB key 0C CLEAR key 0D ENTER key 10 SHIFT key 11 CTRL key 12 ALT key 13 PAUSE key 14 CAPS LOCK key 1B ESC key 20 SPACEBAR 21 PAGE UP key 22 PAGE DOWN key 23 END key 24 HOME key 25 LEFT ARROW key 26 UP ARROW key 27 RIGHT ARROW key 28 DOWN ARROW key 29 SELECT key 2A PRINT key 2B EXECUTE key 2C PRINT SCREEN key 2D INS key 2E DEL key 30 0 key 31 1 key 32 2 key 33 3 key 34 4 key 35 5 key 36 6 key 37 7 key 38 8 key 39 9 key 41 A key 42 B key 43 C key 44 D key 45 E key 46 F key 47 G key 48 H key 49 I key 4A J key 4B K key 4C L key 4D M key 4E N key 4F O key 50 P key 51 Q key 52 R key 53 S key 54 T key 55 U key 56 V key 57 W key 58 X key 59 Y key 5A Z key 5B Left Windows key 5C Right Windows key 60 Numeric keypad 0 key 61 Numeric keypad 1 key 62 Numeric keypad 2 key 63 Numeric keypad 3 key 64 Numeric keypad 4 key 65 Numeric keypad 5 key 66 Numeric keypad 6 key 67 Numeric keypad 7 key 68 Numeric keypad 8 key 69 Numeric keypad 9 key 6A Multiply key 6B Add key 6C Separator key 6D Subtract key 6E Decimal key 6F Divide key 70 F1 key 71 F2 key 72 F3 key 73 F4 key 74 F5 key 75 F6 key 76 F7 key 77 F8 key 78 F9 key 79 F10 key 7A F11 key 7B F12 key 7C-7F F13 key - F16 key 80H-87H F17 key - F24 key 90 NUM LOCK key 91 SCROLL LOCK key A0 Left SHIFT key A1 Right SHIFT key A2 Left CONTROL key A3 Right CONTROL key A4 Left MENU key A5 Right MENU key RelatedNone. Example #include <Misc.au3>$dll = DllOpen("user32.dll")While 1 Sleep ( 250 ) If _IsPressed("23", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIfWEndDllClose($dll) Link to comment Share on other sites More sharing options...
Hyflex Posted November 19, 2006 Author Share Posted November 19, 2006 hmmm, i dont want a .dll opend... I tryed: If _IsPressed() Send("{W Down}") Send("{W Up}") Send("{W Down}") Send("{W Up}") Send("{SPACE Down}") Send("{SPACE Up}") Send{"{LCTRL Down}"} Send{"{LCTRL Up}"} Send("{LSHIFT Down}") Send("{LSHIFT Up}") While _IsPressed() Send("{W Down}") Send("{W Up}") Send("{W Down}") Send("{W Up}") Send("{SPACE Down}") Send("{SPACE Up}") Send{"{LCTRL Down}"} Send{"{LCTRL Up}"} Send("{LSHIFT Down}") Send("{LSHIFT Up}") Wend Endif But didnt work i doing things wrong.. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 19, 2006 Share Posted November 19, 2006 you have to say what key to look for in _IsPressed it doesnt have physcic abilities to read your mind Link to comment Share on other sites More sharing options...
Valuater Posted November 19, 2006 Share Posted November 19, 2006 (edited) 1 did you use this #include <Misc.au3> 2 you have been here a while, please post code with autoit tags [ autoit] ; no spaces ; post code [ /autoit] ; no spaces 3 if you use Tidy ( in SciTE ) it will clean, space and proper case 4 check the syntax in SciTE also 8) Edited November 19, 2006 by Valuater Link to comment Share on other sites More sharing options...
Hyflex Posted November 19, 2006 Author Share Posted November 19, 2006 Yes i tryed that valuator (Didnt work), sorry i forgot about tidy and the autoit bbcodes Link to comment Share on other sites More sharing options...
Developers Jos Posted November 19, 2006 Developers Share Posted November 19, 2006 Yes i tryed that valuator (Didnt work), sorry i forgot about tidy and the autoit bbcodes The code you posted only gives errors .... look at it and try fixing it ..... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Hyflex Posted November 19, 2006 Author Share Posted November 19, 2006 JdeB I cant, ive tryed going though the error msg, and tryed fixing what it sayd.. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 19, 2006 Developers Share Posted November 19, 2006 (edited) JdeB I cant, ive tryed going though the error msg, and tryed fixing what it sayd..But ?Listen, you need to be capable of fixing this yourself... Learn/read first ... invest time in learmning to crawl before you start to run ! Edited November 19, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Hyflex Posted November 20, 2006 Author Share Posted November 20, 2006 Well i have tryed, Quote from someone, cant remember who it is. "The Best way of learning, is by being taught, and then doing it yoursefl" 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