ashley Posted July 6, 2008 Posted July 6, 2008 can anyone post the ispressed coees for each key thanks! Free icons for your programs
Paulie Posted July 6, 2008 Posted July 6, 2008 Too lazy to open the helpfile? CODE 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 BA ; BB = BC , BD - BE . BF / C0 ` DB [ DC \ DD ]
AlmarM Posted July 6, 2008 Posted July 6, 2008 look at my signature for MiscConstants.au3And look mine muttley*_IsPressed Constants*-AlmarM- Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
FreeFry Posted July 7, 2008 Posted July 7, 2008 (edited) Or just have a look at MSDN for the function that the _IsPressed calls, it provides a link to the available keycodes. muttley Edited July 7, 2008 by FreeFry
d4rk Posted July 7, 2008 Posted July 7, 2008 I've bookmarked THIS [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys
hariajay Posted July 14, 2009 Posted July 14, 2009 Hi ... what's the keycode for the "Fn" key in a Laptop?
colafrysen Posted July 14, 2009 Posted July 14, 2009 I think that the function button is only recognized by the BIOS that the laptops manufacturer has provided. So when you press the function key, the keys that have a second function do change into sending another _ispressed value to the OS. Note that i'm only guessing here... [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Moderators Melba23 Posted July 14, 2009 Moderators Posted July 14, 2009 (edited) This question gets asked so many times.... There is a Search function, please use it! (Directed at no-one personally )colafrysen,Absolutely correct - the Fn key is hardware based and AutoIt cannot duplicate it. hariajay,The only solution is to mimic whatever the 'Fn + key' was supposed to do and map it to another key.M23Edit: Changed it to what I meant to say in the first place! Edited July 15, 2009 by Melba23  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Â
AdmiralAlkex Posted July 14, 2009 Posted July 14, 2009 Hi ... what's the keycode for the "Fn" key in a Laptop?The "Fn" key is special in that it's handled by the keyboard controller, and never touches touches Windows. You will just have to handle the "Fn"+something as a ordinary key @Melba23You seem confused, if the "Fn" key really was software it could be used as a ordinary key, but it's really controlled by the keyboard itself. Check the link above .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
Moderators Melba23 Posted July 15, 2009 Moderators Posted July 15, 2009 AdmiralAlkex, You are quite correct - I have amended my earlier post. Sorry for the confusion. M23  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Â
Rogue5099 Posted July 15, 2009 Posted July 15, 2009 expandcollapse popup#include <Misc.au3> $dll = DllOpen("user32.dll") Opt("TrayIconHide", 1) ToolTip("Press ESC to Exit!", 1, 1) While 1 Sleep ( 50 ) If _IsPressed("01", $dll) Then MsgBox(0,"_IsPressed", "01", 1) EndIf If _IsPressed("02", $dll) Then MsgBox(0,"_IsPressed", "04", 1) EndIf If _IsPressed("04", $dll) Then MsgBox(0,"_IsPressed", "04", 1) EndIf If _IsPressed("05", $dll) Then MsgBox(0,"_IsPressed", "05", 1) EndIf If _IsPressed("06", $dll) Then MsgBox(0,"_IsPressed", "06", 1) EndIf If _IsPressed("08", $dll) Then MsgBox(0,"_IsPressed", "08", 1) EndIf If _IsPressed("09", $dll) Then MsgBox(0,"_IsPressed", "09", 1) EndIf If _IsPressed("0C", $dll) Then MsgBox(0,"_IsPressed", "0C", 1) EndIf If _IsPressed("0D", $dll) Then MsgBox(0,"_IsPressed", "0D", 1) EndIf If _IsPressed("10", $dll) Then MsgBox(0,"_IsPressed", "10", 1) EndIf If _IsPressed("11", $dll) Then MsgBox(0,"_IsPressed", "11", 1) EndIf If _IsPressed("12", $dll) Then MsgBox(0,"_IsPressed", "12", 1) EndIf If _IsPressed("13", $dll) Then MsgBox(0,"_IsPressed", "13", 1) EndIf If _IsPressed("14", $dll) Then MsgBox(0,"_IsPressed", "14", 1) EndIf If _IsPressed("1B", $dll) Then MsgBox(0,"_IsPressed", "1B", 1) DllClose($dll) Exit EndIf If _IsPressed("20", $dll) Then MsgBox(0,"_IsPressed", "20", 1) EndIf If _IsPressed("21", $dll) Then MsgBox(0,"_IsPressed", "21", 1) EndIf If _IsPressed("22", $dll) Then MsgBox(0,"_IsPressed", "22", 1) EndIf If _IsPressed("23", $dll) Then MsgBox(0,"_IsPressed", "23", 1) EndIf If _IsPressed("24", $dll) Then MsgBox(0,"_IsPressed", "24", 1) EndIf If _IsPressed("25", $dll) Then MsgBox(0,"_IsPressed", "25", 1) EndIf If _IsPressed("26", $dll) Then MsgBox(0,"_IsPressed", "26", 1) EndIf If _IsPressed("27", $dll) Then MsgBox(0,"_IsPressed", "27", 1) EndIf If _IsPressed("28", $dll) Then MsgBox(0,"_IsPressed", "28", 1) EndIf If _IsPressed("29", $dll) Then MsgBox(0,"_IsPressed", "29", 1) EndIf If _IsPressed("2A", $dll) Then MsgBox(0,"_IsPressed", "2A", 1) EndIf If _IsPressed("2B", $dll) Then MsgBox(0,"_IsPressed", "2B", 1) EndIf If _IsPressed("2C", $dll) Then MsgBox(0,"_IsPressed", "2C", 1) EndIf If _IsPressed("2D", $dll) Then MsgBox(0,"_IsPressed", "2D", 1) EndIf If _IsPressed("2E", $dll) Then MsgBox(0,"_IsPressed", "2E", 1) EndIf If _IsPressed("30", $dll) Then MsgBox(0,"_IsPressed", "30", 1) EndIf If _IsPressed("31", $dll) Then MsgBox(0,"_IsPressed", "31", 1) EndIf If _IsPressed("32", $dll) Then MsgBox(0,"_IsPressed", "32", 1) EndIf If _IsPressed("33", $dll) Then MsgBox(0,"_IsPressed", "33", 1) EndIf If _IsPressed("34", $dll) Then MsgBox(0,"_IsPressed", "34", 1) EndIf If _IsPressed("35", $dll) Then MsgBox(0,"_IsPressed", "35", 1) EndIf If _IsPressed("36", $dll) Then MsgBox(0,"_IsPressed", "36", 1) EndIf If _IsPressed("37", $dll) Then MsgBox(0,"_IsPressed", "37", 1) EndIf If _IsPressed("38", $dll) Then MsgBox(0,"_IsPressed", "38", 1) EndIf If _IsPressed("39", $dll) Then MsgBox(0,"_IsPressed", "39", 1) EndIf If _IsPressed("41", $dll) Then MsgBox(0,"_IsPressed", "41", 1) EndIf If _IsPressed("42", $dll) Then MsgBox(0,"_IsPressed", "42", 1) EndIf If _IsPressed("43", $dll) Then MsgBox(0,"_IsPressed", "43", 1) EndIf If _IsPressed("44", $dll) Then MsgBox(0,"_IsPressed", "44", 1) EndIf If _IsPressed("45", $dll) Then MsgBox(0,"_IsPressed", "45", 1) EndIf If _IsPressed("46", $dll) Then MsgBox(0,"_IsPressed", "46", 1) EndIf If _IsPressed("47", $dll) Then MsgBox(0,"_IsPressed", "47", 1) EndIf If _IsPressed("48", $dll) Then MsgBox(0,"_IsPressed", "48", 1) EndIf If _IsPressed("49", $dll) Then MsgBox(0,"_IsPressed", "49", 1) EndIf If _IsPressed("4A", $dll) Then MsgBox(0,"_IsPressed", "4A", 1) EndIf If _IsPressed("4B", $dll) Then MsgBox(0,"_IsPressed", "4B", 1) EndIf If _IsPressed("4C", $dll) Then MsgBox(0,"_IsPressed", "4C", 1) EndIf If _IsPressed("4D", $dll) Then MsgBox(0,"_IsPressed", "4D", 1) EndIf If _IsPressed("4E", $dll) Then MsgBox(0,"_IsPressed", "4E", 1) EndIf If _IsPressed("4F", $dll) Then MsgBox(0,"_IsPressed", "4F", 1) EndIf If _IsPressed("50", $dll) Then MsgBox(0,"_IsPressed", "50", 1) EndIf If _IsPressed("51", $dll) Then MsgBox(0,"_IsPressed", "51", 1) EndIf If _IsPressed("52", $dll) Then MsgBox(0,"_IsPressed", "52", 1) EndIf If _IsPressed("53", $dll) Then MsgBox(0,"_IsPressed", "53", 1) EndIf If _IsPressed("54", $dll) Then MsgBox(0,"_IsPressed", "54", 1) EndIf If _IsPressed("55", $dll) Then MsgBox(0,"_IsPressed", "55", 1) EndIf If _IsPressed("56", $dll) Then MsgBox(0,"_IsPressed", "56", 1) EndIf If _IsPressed("57", $dll) Then MsgBox(0,"_IsPressed", "57", 1) EndIf If _IsPressed("58", $dll) Then MsgBox(0,"_IsPressed", "58", 1) EndIf If _IsPressed("59", $dll) Then MsgBox(0,"_IsPressed", "59", 1) EndIf If _IsPressed("5A", $dll) Then MsgBox(0,"_IsPressed", "5A", 1) EndIf If _IsPressed("5B", $dll) Then MsgBox(0,"_IsPressed", "5B", 1) EndIf If _IsPressed("5C", $dll) Then MsgBox(0,"_IsPressed", "5C", 1) EndIf If _IsPressed("60", $dll) Then MsgBox(0,"_IsPressed", "60", 1) EndIf If _IsPressed("61", $dll) Then MsgBox(0,"_IsPressed", "61", 1) EndIf If _IsPressed("62", $dll) Then MsgBox(0,"_IsPressed", "62", 1) EndIf If _IsPressed("63", $dll) Then MsgBox(0,"_IsPressed", "63", 1) EndIf If _IsPressed("64", $dll) Then MsgBox(0,"_IsPressed", "64", 1) EndIf If _IsPressed("65", $dll) Then MsgBox(0,"_IsPressed", "65", 1) EndIf If _IsPressed("66", $dll) Then MsgBox(0,"_IsPressed", "66", 1) EndIf If _IsPressed("67", $dll) Then MsgBox(0,"_IsPressed", "67", 1) EndIf If _IsPressed("68", $dll) Then MsgBox(0,"_IsPressed", "68", 1) EndIf If _IsPressed("69", $dll) Then MsgBox(0,"_IsPressed", "69", 1) EndIf If _IsPressed("6A", $dll) Then MsgBox(0,"_IsPressed", "6A", 1) EndIf If _IsPressed("6B", $dll) Then MsgBox(0,"_IsPressed", "6B", 1) EndIf If _IsPressed("6C", $dll) Then MsgBox(0,"_IsPressed", "6C", 1) EndIf If _IsPressed("6D", $dll) Then MsgBox(0,"_IsPressed", "6D", 1) EndIf If _IsPressed("6E", $dll) Then MsgBox(0,"_IsPressed", "6E", 1) EndIf If _IsPressed("6F", $dll) Then MsgBox(0,"_IsPressed", "6F", 1) EndIf If _IsPressed("70", $dll) Then MsgBox(0,"_IsPressed", "70", 1) EndIf If _IsPressed("71", $dll) Then MsgBox(0,"_IsPressed", "71", 1) EndIf If _IsPressed("72", $dll) Then MsgBox(0,"_IsPressed", "72", 1) EndIf If _IsPressed("73", $dll) Then MsgBox(0,"_IsPressed", "73", 1) EndIf If _IsPressed("74", $dll) Then MsgBox(0,"_IsPressed", "74", 1) EndIf If _IsPressed("75", $dll) Then MsgBox(0,"_IsPressed", "75", 1) EndIf If _IsPressed("76", $dll) Then MsgBox(0,"_IsPressed", "76", 1) EndIf If _IsPressed("77", $dll) Then MsgBox(0,"_IsPressed", "77", 1) EndIf If _IsPressed("78", $dll) Then MsgBox(0,"_IsPressed", "78", 1) EndIf If _IsPressed("79", $dll) Then MsgBox(0,"_IsPressed", "79", 1) EndIf If _IsPressed("7A", $dll) Then MsgBox(0,"_IsPressed", "7A", 1) EndIf If _IsPressed("7B", $dll) Then MsgBox(0,"_IsPressed", "7B", 1) EndIf If _IsPressed("7C", $dll) Then MsgBox(0,"_IsPressed", "7C", 1) EndIf If _IsPressed("7D", $dll) Then MsgBox(0,"_IsPressed", "7D", 1) EndIf If _IsPressed("7E", $dll) Then MsgBox(0,"_IsPressed", "7E", 1) EndIf If _IsPressed("7F", $dll) Then MsgBox(0,"_IsPressed", "7F", 1) EndIf If _IsPressed("80H", $dll) Then MsgBox(0,"_IsPressed", "80H", 1) EndIf If _IsPressed("81H", $dll) Then MsgBox(0,"_IsPressed", "81H", 1) EndIf If _IsPressed("82H", $dll) Then MsgBox(0,"_IsPressed", "82H", 1) EndIf If _IsPressed("83H", $dll) Then MsgBox(0,"_IsPressed", "83H", 1) EndIf If _IsPressed("84H", $dll) Then MsgBox(0,"_IsPressed", "84H", 1) EndIf If _IsPressed("85H", $dll) Then MsgBox(0,"_IsPressed", "85H", 1) EndIf If _IsPressed("86H", $dll) Then MsgBox(0,"_IsPressed", "86H", 1) EndIf If _IsPressed("87H", $dll) Then MsgBox(0,"_IsPressed", "87H", 1) EndIf If _IsPressed("90", $dll) Then MsgBox(0,"_IsPressed", "90", 1) EndIf If _IsPressed("91", $dll) Then MsgBox(0,"_IsPressed", "91", 1) EndIf If _IsPressed("A0", $dll) Then MsgBox(0,"_IsPressed", "A0", 1) EndIf If _IsPressed("A1", $dll) Then MsgBox(0,"_IsPressed", "A1", 1) EndIf If _IsPressed("A2", $dll) Then MsgBox(0,"_IsPressed", "A2", 1) EndIf If _IsPressed("A3", $dll) Then MsgBox(0,"_IsPressed", "A3", 1) EndIf If _IsPressed("A4", $dll) Then MsgBox(0,"_IsPressed", "A4", 1) EndIf If _IsPressed("A5", $dll) Then MsgBox(0,"_IsPressed", "A5", 1) EndIf If _IsPressed("BA", $dll) Then MsgBox(0,"_IsPressed", "BA", 1) EndIf If _IsPressed("BB", $dll) Then MsgBox(0,"_IsPressed", "BB", 1) EndIf If _IsPressed("BC", $dll) Then MsgBox(0,"_IsPressed", "BC" 1) EndIf If _IsPressed("BD", $dll) Then MsgBox(0,"_IsPressed", "BD", 1) EndIf If _IsPressed("BE", $dll) Then MsgBox(0,"_IsPressed", "BE", 1) EndIf If _IsPressed("BF", $dll) Then MsgBox(0,"_IsPressed", "BF", 1) EndIf If _IsPressed("C0", $dll) Then MsgBox(0,"_IsPressed", "C0", 1) EndIf If _IsPressed("DB", $dll) Then MsgBox(0,"_IsPressed", "DB", 1) EndIf If _IsPressed("DC", $dll) Then MsgBox(0,"_IsPressed", "DC", 1) EndIf If _IsPressed("DD", $dll) Then MsgBox(0,"_IsPressed", "DD", 1) EndIf WEnd_IsPressed.au3 My projects: Inventory / Mp3 Inventory, Computer Stats
AdmiralAlkex Posted July 15, 2009 Posted July 15, 2009 @rogue5099 You should look at "For...In...Next" in the helpfile, your script could then be done in 15 lines instead of 400... .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
Rogue5099 Posted July 16, 2009 Posted July 16, 2009 (edited) @rogue5099 You should look at "For...In...Next" in the helpfile, your script could then be done in 15 lines instead of 400... To make you happy expandcollapse popup#include <Misc.au3> $dll = DllOpen("user32.dll") Opt("TrayIconHide", 1) ToolTip("Press ESC to Exit!", 1, 1) While 1 Sleep ( 50 ) For $i = 1 To 9 If _IsPressed("0"&$i, $dll) Then MsgBox(0,"_IsPressed", "0"&$i, 1) EndIf Next For $i = 10 To 14 If _IsPressed($i, $dll) Then MsgBox(0,"_IsPressed", $i, 1) EndIf Next For $i = 20 To 79 If _IsPressed($i, $dll) Then MsgBox(0,"_IsPressed", $i, 1) EndIf Next For $i = 90 To 91 If _IsPressed($i, $dll) Then MsgBox(0,"_IsPressed", $i, 1) EndIf Next For $i = 80 To 87 If _IsPressed($i&"H", $dll) Then MsgBox(0,"_IsPressed", $i&"H", 1) EndIf Next For $i = 0 To 5 If _IsPressed("A"&$i, $dll) Then MsgBox(0,"_IsPressed", "A"&$i, 1) EndIf Next If _IsPressed("0C", $dll) Then MsgBox(0,"_IsPressed", "0C", 1) EndIf If _IsPressed("0D", $dll) Then MsgBox(0,"_IsPressed", "0D", 1) EndIf If _IsPressed("1B", $dll) Then MsgBox(0,"_IsPressed", "1B", 1) DllClose($dll) Exit EndIf If _IsPressed("2A", $dll) Then MsgBox(0,"_IsPressed", "2A", 1) EndIf If _IsPressed("2B", $dll) Then MsgBox(0,"_IsPressed", "2B", 1) EndIf If _IsPressed("2C", $dll) Then MsgBox(0,"_IsPressed", "2C", 1) EndIf If _IsPressed("2D", $dll) Then MsgBox(0,"_IsPressed", "2D", 1) EndIf If _IsPressed("2E", $dll) Then MsgBox(0,"_IsPressed", "2E", 1) EndIf If _IsPressed("4A", $dll) Then MsgBox(0,"_IsPressed", "4A", 1) EndIf If _IsPressed("4B", $dll) Then MsgBox(0,"_IsPressed", "4B", 1) EndIf If _IsPressed("4C", $dll) Then MsgBox(0,"_IsPressed", "4C", 1) EndIf If _IsPressed("4D", $dll) Then MsgBox(0,"_IsPressed", "4D", 1) EndIf If _IsPressed("4E", $dll) Then MsgBox(0,"_IsPressed", "4E", 1) EndIf If _IsPressed("4F", $dll) Then MsgBox(0,"_IsPressed", "4F", 1) EndIf If _IsPressed("5A", $dll) Then MsgBox(0,"_IsPressed", "5A", 1) EndIf If _IsPressed("5B", $dll) Then MsgBox(0,"_IsPressed", "5B", 1) EndIf If _IsPressed("5C", $dll) Then MsgBox(0,"_IsPressed", "5C", 1) EndIf If _IsPressed("6A", $dll) Then MsgBox(0,"_IsPressed", "6A", 1) EndIf If _IsPressed("6B", $dll) Then MsgBox(0,"_IsPressed", "6B", 1) EndIf If _IsPressed("6C", $dll) Then MsgBox(0,"_IsPressed", "6C", 1) EndIf If _IsPressed("6D", $dll) Then MsgBox(0,"_IsPressed", "6D", 1) EndIf If _IsPressed("6E", $dll) Then MsgBox(0,"_IsPressed", "6E", 1) EndIf If _IsPressed("6F", $dll) Then MsgBox(0,"_IsPressed", "6F", 1) EndIf If _IsPressed("7A", $dll) Then MsgBox(0,"_IsPressed", "7A", 1) EndIf If _IsPressed("7B", $dll) Then MsgBox(0,"_IsPressed", "7B", 1) EndIf If _IsPressed("7C", $dll) Then MsgBox(0,"_IsPressed", "7C", 1) EndIf If _IsPressed("7D", $dll) Then MsgBox(0,"_IsPressed", "7D", 1) EndIf If _IsPressed("7E", $dll) Then MsgBox(0,"_IsPressed", "7E", 1) EndIf If _IsPressed("7F", $dll) Then MsgBox(0,"_IsPressed", "7F", 1) EndIf If _IsPressed("BA", $dll) Then MsgBox(0,"_IsPressed", "BA", 1) EndIf If _IsPressed("BB", $dll) Then MsgBox(0,"_IsPressed", "BB", 1) EndIf If _IsPressed("BC", $dll) Then MsgBox(0,"_IsPressed", "BC", 1) EndIf If _IsPressed("BD", $dll) Then MsgBox(0,"_IsPressed", "BD", 1) EndIf If _IsPressed("BE", $dll) Then MsgBox(0,"_IsPressed", "BE", 1) EndIf If _IsPressed("BF", $dll) Then MsgBox(0,"_IsPressed", "BF", 1) EndIf If _IsPressed("C0", $dll) Then MsgBox(0,"_IsPressed", "C0", 1) EndIf If _IsPressed("DB", $dll) Then MsgBox(0,"_IsPressed", "DB", 1) EndIf If _IsPressed("DC", $dll) Then MsgBox(0,"_IsPressed", "DC", 1) EndIf If _IsPressed("DD", $dll) Then MsgBox(0,"_IsPressed", "DD", 1) EndIf WEnd_IsPressed.au3 Edited July 16, 2009 by rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats
Yashied Posted July 16, 2009 Posted July 16, 2009 (edited) Opt('GUICloseOnESC', 0) Global $tState = DllStructCreate('byte[256]') GUICreate('MyGUI', 200, 200) $Label = GUICtrlCreateLabel('', 20, 72, 160, 52, 0x01) GUICtrlSetFont(-1, 32, 800, 0, 'Tahoma') GUISetState() $Prev = -1 While 1 Sleep(10) If GUIGetMsg() = -3 Then ExitLoop EndIf $Key = 0 $Ret = DllCall('user32.dll', 'int', 'GetKeyboardState', 'ptr', DllStructGetPtr($tState)) For $i = 0x08 To 0xFF Switch $i Case 0x0A, 0x0B, 0x0E To 0x0F, 0x16, 0x1A, 0x1C To 0x1F, 0x3A To 0x40, 0x5E, 0x88 To 0x8F, 0x97 To 0x9F, 0xB8 To 0xB9, 0xC1 To 0xDA, 0xE0, 0xE8 ContinueLoop Case Else If BitAND(DllStructGetData($tState, 1, $i + 1), 0xF0) Then $Key = $i ExitLoop EndIf EndSwitch Next If $Key <> $Prev Then GUICtrlSetData($Label, '0x' & Hex($Key, 2)) $Prev = $Key EndIf WEnd Edited July 16, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Rogue5099 Posted July 17, 2009 Posted July 17, 2009 @Yashied Very Nice but it misses mouse clicks and still not 15 lines as stated before . Good job or Nice find! My projects: Inventory / Mp3 Inventory, Computer Stats
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