myspacee Posted June 12, 2009 Share Posted June 12, 2009 hello to all,i'm here hex code to detect é è ò à ù ì letters.I see that some of these are in same button than symbol and is possible to detect :DB = [ = é èbut for the others letters ?m. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 12, 2009 Moderators Share Posted June 12, 2009 myspacee, Try detecting the key combination you need to get the accented characters - something like this:#Include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 10 ) If _IsPressed("11", $dll) And _IsPressed("41", $dll) Then MsgBox(0,"_IsPressed", "Ctrl-A Pressed") ExitLoop EndIf WEnd DllClose($dll) 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 Link to comment Share on other sites More sharing options...
myspacee Posted June 12, 2009 Author Share Posted June 12, 2009 thank you for reply m23, but which combination for ? : è = é = ì = ò = à = ù = Isn't possible map key directly ? m. Link to comment Share on other sites More sharing options...
Yashied Posted June 12, 2009 Share Posted June 12, 2009 _IsPressed() checks the holding down a keys on the keyboard and does not depend on language layouts. Use the codes for the keys as shown Melba23. 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... Link to comment Share on other sites More sharing options...
myspacee Posted June 12, 2009 Author Share Posted June 12, 2009 can't post too much code before be tagged as keylogger so i post part of manual:expandcollapse popup01 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 ]I Know that _ispressed() is more 'hardware function' than software one.But I Can't understant how detect 'ò' and 'à' and 'ù' keypress (è and é is detectable by hex code DB and DD)feel so stupid,m. Link to comment Share on other sites More sharing options...
nf67 Posted June 12, 2009 Share Posted June 12, 2009 (edited) thank you for reply m23, but which combination for ? : è = é = ì = ò = à = ù = Isn't possible map key directly ? m. Perhaps these codes could be of use to you? http://www.fileformat.info/info/unicode/char/00e8/index.htm è http://www.fileformat.info/info/unicode/char/00e9/index.htm é http://www.fileformat.info/info/unicode/char/00ec/index.htm ì http://www.fileformat.info/info/unicode/char/00f2/index.htm ò http://www.fileformat.info/info/unicode/char/00e0/index.htm à http://www.fileformat.info/info/unicode/char/00f9/index.htm ù Example using é: Run("notepad.exe") Sleep(3000) Send("{ASC 0x00E9}") ;Replace 0x00E9 with the character's UTF-16 (hex) code. Exit Edited June 12, 2009 by nf67 Link to comment Share on other sites More sharing options...
myspacee Posted June 12, 2009 Author Share Posted June 12, 2009 (edited) For sure my english is so bad that i can't do well my question. this script never work : #Include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 10 ) If _IsPressed("E0", $dll) Then MsgBox(0,"_IsPressed", "hex code E0 aka à") ExitLoop EndIf WEnd DllClose($dll) We say keyboard layout is not so important, so can you post for me script that return a msgbox when you press letter 'à' ? sorry for not understand, m. Edited June 12, 2009 by myspacee Link to comment Share on other sites More sharing options...
KaFu Posted June 12, 2009 Share Posted June 12, 2009 (edited) I think there might be a way using a dllcall of the user32.dll function MapVirtualKeyEx.. I tried and now I'm to tiered to further pursuit this , maybe someone else wants to pick up? Cheers expandcollapse popup#include<winapi.au3> ;#include<misc.au3> ;while 1 ; if _IsPressed('5a') then ConsoleWrite('z' & @crlf) ;WEnd Global Const $MAPVK_VK_TO_VSC = 0 Global Const $MAPVK_VSC_TO_VK = 1 Global Const $MAPVK_VK_TO_CHAR = 2 Global Const $MAPVK_VSC_TO_VK_EX = 3 Global Const $MAPVK_VK_TO_VSC_EX = 4 $hWnd_Desktop = _WinAPI_GetDesktopWindow() ; ; Z = 5A $sHexKey = "5a" ConsoleWrite(_WinAPI_GetKeyboardLayout($hWnd_Desktop) & @crlf) $sKbLayout = _WinAPI_GetKeyboardLayout($hWnd_Desktop) ConsoleWrite(_WinAPI_MapVirtualKeyEx($sHexKey,$sKbLayout) & @crlf) ConsoleWrite(Chr('0x' & _WinAPI_MapVirtualKeyEx($sHexKey,$sKbLayout)) & @crlf) ; http://msdn.microsoft.com/en-us/library/ms646307(VS.85).aspx Func _WinAPI_MapVirtualKeyEx($sHexKey,$sKbLayout) Local $Ret = DllCall('user32.dll', 'long', 'MapVirtualKeyEx', 'int', '0x' & $sHexKey, 'int', 0, 'int', '0x' & $sKbLayout) Return $Ret[0] EndFunc ; http://www.autoitscript.com/forum/index.php?showtopic=95883&view=findpost&p=690005 ; by Yashied Func _WinAPI_GetKeyboardLayout($hWnd) Local $Ret = DllCall('user32.dll', 'long', 'GetWindowThreadProcessId', 'hwnd', $hWnd, 'ptr', 0) If (@error) Or ($Ret[0] = 0) Then Return SetError(1, 0, 0) EndIf $Ret = DllCall('user32.dll', 'long', 'GetKeyboardLayout', 'long', $Ret[0]) If (@error) Or ($Ret[0] = 0) Then Return SetError(1, 0, 0) EndIf Return '0000' & Hex($Ret[0], 4) ;Return Hex($Ret[0], 4) EndFunc ;==>_WinAPI_GetKeyboardLayout Edited June 12, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
martin Posted June 12, 2009 Share Posted June 12, 2009 (edited) For sure my english is so bad that i can't do well my question. this script never work : #Include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 10 ) If _IsPressed("E0", $dll) Then MsgBox(0,"_IsPressed", "hex code E0 aka à") ExitLoop EndIf WEnd DllClose($dll) We say keyboard layout is not so important, so can you post for me script that return a msgbox when you press letter 'à' ? sorry for not understand, m. #include <Array.au3> #include <misc.au3> $Gui = GUICreate("codes") $ed = GUICtrlCreateEdit("", 0, 0, 400, 400) GUISetState() Dim $arraystate[257], $arraystatenew[257] opt("winwaitdelay",30) MsgBox(262144, "Please ensure no key is pressed ...", "...then click OK" & @CRLF & "(press ESC to quit)") For $i = 1 To 256 $arraystate[$i] = _IsPressed(Hex($i, 2)) Next ;report the change of key state ;press a key to find it's code While 1 For $i = 1 To 256 if _Ispressed("1B") then exit $arraystatenew[$i] = _IsPressed(Hex($i, 2)) If $arraystate[$i] <> $arraystatenew[$i] Then WinActivate($Gui) Send("=" & Hex($i, 2) & "{ENTER}") EndIf $arraystate[$i] = $arraystatenew[$i] Next Sleep(40) WEnd EDIT: Modified so you could quit th escript by pressing Escape. Edited June 13, 2009 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
myspacee Posted June 13, 2009 Author Share Posted June 13, 2009 wonderfull piece of code, so : è=BA ò=C0 à=DE ù=BF ì=DD Thank you for your time, m. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 13, 2009 Moderators Share Posted June 13, 2009 myspacee, Be careful, those codes will only work for the keyboard layout that you tested. Other layouts use different key combinations to get the accented characters and so will require different codes - if there are actual key combinations to get accented characters at all (for example, my UK keyboard has none - I have to use a software fix or Alt-keypad). 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 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