czardas Posted November 29, 2011 Share Posted November 29, 2011 (edited) I can never remember the extended ascii codes and I find it tedious keep having to look them up, select them and then having to copy and paste them. So I decided to design an extended ascii virtual keyboard.The layout is intended to be intuitive with numeric keys at the top, alphabetic keys on the left, puntuation in the middle and various other symbols appearing to the right. Keys can not be held down since the virtual keyboard needs to lose focus in order to interact with other windows.The method used is an adaptation of the method used by Info in the following topic:Reading Info's thread saved me some time, and credit must also go to the MvPs who contributed to that project.Not all extended ascii characters are included. Four of the keys on the left act as letter modification locks which effect the letters a, e, i, o, u and y. If you wish to type the actual character displayed on one of the modifier keys, you must press the shift key on your main computer keyboard. To type capital letters you can use the shift key or the caps lock key on your main keyboard.PROBLEMS POSTING THE LATEST CODEThe latest code did not display as intended, since the forum software is confusing part of my my code for html. The html entites are displaying as characters and not as code. You need to download the zip file below to view the source. The zip also includes the compiled script, image resources and READ ME.txt which contains important information.This script is a spin off from a bigger project, so I have only developed it to the point where it became a functional tool. I don't intend to take the development of this much further, unless by request; however I will most likely use the keypad design layout for other projects in the future.Change Log 01 Dec 2011The following additional features have been added:1. Send ASCII Number2. Send ASCII Hex3. Send Unicode Entry Point4. Send Unicode Hex Entry Point5. Send Html EntityChange Log 31 Jan 2012The following features have been added:1. Check to see if the compiled script is already running.2. Notification message if two instances of the script are running.Change Log 10 Feb 2012 (including modifications to Melba23's code)1.Minor code modifications and general improvements to look and feel factors.2. Replaced imaged resources.Modifications to Melba23's _Notify_WM_MOUSEACTIVATEexpandcollapse popupFunc _Notify_WM_MOUSEACTIVATE($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg, $wParam, $lParam ; Check timer is not checking If $aNotify_Settings[0][5] Then Return EndIf ; Check handler not already retracting If $aNotify_Settings[1][5] Then Return EndIf ; Set flag to show handler retracting $aNotify_Settings[1][5] = True ; Declare flag ;Local $fMoved = False ; Commented out by czardas For $i = $aNotify_Data[0][0] To 1 Step -1 If $aNotify_Data[$i][3] And $hWnd = $aNotify_Data[$i][0] Then _Notify_Delete($i) ; $fMoved = True ; Commented out by czardas ; ExitLoop ; Commented out by czardas EndIf Next ; Adjust positions of Notifications ;If $fMoved Then ; Commented out by czardas ; _Notify_Reset($i) ; Commented out by czardas ;EndIf ; Commented out by czardas ; Clear Running flag ;$aNotify_Settings[1][5] = False ; Commented out by czardas ;Return "GUI_RUNDEFMSG" ; Commented out by czardas Exit ; Added by czardas EndFunc ;==>;_Notify_WM_MOUSEACTIVATEThe above alterations force the application to exit when you click on the notification message. They are not intended for general use with other scripts.Change Log 05 Jan 2013Improvement to the mouse over pop-up title bar, enabling you to drag other windows behind the keyboard without them being automatically dropped.Download the latest version of win-1252.win-1252v1.4.zipSHA-1 0C03C570A45386FBA9C4ADB0AD030DFB7D699614Previous downloads 116 by Melba23 are now included in the zip file. I have slightly modified M23's UDF, but this change isn't a requirement. See Change Log 10 Feb 2012 above. Edited January 5, 2013 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
martin Posted November 29, 2011 Share Posted November 29, 2011 Very nice czardas. In the thread you referred to wraithdu explained how to make the keyboard so that it never took the focus and I think it would be good to use that idea. Instead of having the letter typed into the active window, could you make an option to insert the ascii code instead, maybe like "Chr(230)", and an option to not insert anything but just display the code for the last key pressed. 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...
czardas Posted November 29, 2011 Author Share Posted November 29, 2011 (edited) Thanks Martin. I will implement sending the ascii codes as an option shortly. Perhaps it would be a good idea to also include html codes. Regarding another method, without taking focus. I don't exactly understand (from reading that thread) what you mean. Surely the keyboard will always take focus when it is clicked (or if you drag the window), even if just for a fraction of a second. I think. Quoting from the thread.I'm suprised after that other thread this was how you chose to do it, but so be it.I wish I knew which other thread wraithdu was refering to, since I couldn't find it. Perhaps that's where I can find a better method. Perhaps that's also what you are refering to. I'll look again and see if I can find the mystery thread. Edited November 29, 2011 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
wakillon Posted November 29, 2011 Share Posted November 29, 2011 Well done ! Thanks to share. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
martin Posted November 29, 2011 Share Posted November 29, 2011 ..I wish I knew which other thread wraithdu was refering to, since I couldn't find it. Perhaps that's where I can find a better method. Perhaps that's also what you are refering to. I'll look again and see if I can find the mystery thread.have a look 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...
czardas Posted November 29, 2011 Author Share Posted November 29, 2011 (edited) have a look Thanks Martin. I wish I had found that thread earlier. It certainly looks very nice, but I'm not sure if I will be able to drag the keyboard around with the mouse if I use wraithdu's method. I'll have to study it and see if that's possible. I have a feeling that you need to allow the GUI to gain focus in order for dragging to work. I need a break right now though, but I will look into it soon.Also thanks to you too Wakillon. I'm glad you like the design. Edited November 30, 2011 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted December 1, 2011 Author Share Posted December 1, 2011 (edited) I have implemented Martin's suggestions above (thanks for that), and solved the question of dragging a GUI without focus. Additional features include sending ASCII numbers, hex numbers, unicode entry points, unicode hex and html entities. Also several improvements have been made to the font choices on the buttons. See first post for the updated version. Edited December 1, 2011 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
martin Posted December 1, 2011 Share Posted December 1, 2011 It's very good now; I like the improvements you have made: the pop-up caption works very well, the code option buttons are great. czardas 1 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...
czardas Posted December 1, 2011 Author Share Posted December 1, 2011 (edited) Thanks for pointing me in the right direction. I very much appreciate your comments. This keyborad will certainly save some time, for me at least. One thing I can't get over is how the keys arranged themselves naturally into a perfect rectangle. All I did was remove all non displaying characters, and determine which letters required modification. The result was that exactly 70 keys were needed. How convenient is that? Edited December 2, 2011 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Thornhunt Posted December 2, 2011 Share Posted December 2, 2011 just a note, with the 'html' held if i press the 'ž' button it opens internet explorer Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D Link to comment Share on other sites More sharing options...
czardas Posted December 2, 2011 Author Share Posted December 2, 2011 (edited) Thornhunt, I believe I have traced the cause of the problem. I had indeed had a slight oversight regarding sending the html code for ž. Thanks for alerting me to this. The modified script above should fix the problem. Please let me know if the problem persists. Edited December 3, 2011 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Thornhunt Posted January 8, 2012 Share Posted January 8, 2012 it works fine now, glad i could help p.s sorry for the late reply Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D Link to comment Share on other sites More sharing options...
czardas Posted January 8, 2012 Author Share Posted January 8, 2012 Thanks Thornhunt. I appreciate it. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
JScript Posted January 8, 2012 Share Posted January 8, 2012 @czardasGreat idea, for sure, yes I'll use! Five stars from me...Thanks for sharing!Regards,João Carlos. czardas 1 http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
czardas Posted January 31, 2012 Author Share Posted January 31, 2012 New version 31 Jan 2012 includes a bug fix. Running two versions of the script caused interference with the popup window title bar. The bug has been fixed in the latest version, however the source should be compiled for the program to work as intended. I have left the original code in the first post. The executable and the latest source plus image resources needed to compile the script are included in zip file.attached to the end of the first post. The new version uses Notify.au3 by Melba23. You will have to download Melba's stuff from the links provided if you wish to compile the script yourself. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 31, 2012 Moderators Share Posted January 31, 2012 czardas, Very nice! 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...
czardas Posted January 31, 2012 Author Share Posted January 31, 2012 M23 It makes me happy that you approve! I make use of several of your UDFs in other projects too, but these projects are far from completion. You'll see them one day. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted February 10, 2012 Author Share Posted February 10, 2012 (edited) This latest version (10 Feb 2012) has undergone one or two very minor tweaks and is now ready for official release, (I still need to add it to my website - when I find time). See change log in the first post. To view the source you need to download the zip attachment. Unfortunately I couldn't post the code on the forum because the software wouldn't let me. This is a bug with the forum code boxes, and has nothing to do with the code I wrote. You will find further explanation in the first post. The second occurence now exits more gracefully if a user tries to simultaneously run the program twice. The program no longer displays a second tray icon if this happens. I have also included some new documentation and added some colour to the icon. Edited February 10, 2012 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted January 5, 2013 Author Share Posted January 5, 2013 (edited) I finally got around to making one more significant improvement to this which I had planned a while ago. The problem with the old pop-up title bar was that it often interfered when dragging other windows behind the keyboard. If the mouse entered the area of the hidden title bar, it would drop the first window and focus on the keyboard instead. This was very easy to fix in just two lines of code, although at first I thought it would be more difficult. While the previous version worked quite well, it's certainly much better now that this problem has been ironed out. See Change Log 05 Jan 2013 in the first post. The latest version v1.4 is in the zip file attachment.I thought of replacing the Send() function in various ways, but decided it was too much effort for too little gain: due to the multitude of different types of control that will be receiving the key strokes. I also tried sending some keys using alternative Window's codes but was never satisfied with the results. Consequently, some keys may trigger a mysteriously hidden accelerator in certain applications. For example sending the character í opens print preview in MS Word 2003, but behaves normally in notepad and in this forum editor. Such instances appear to be quite rare, so I don't think it's a big deal. You can still copy and paste into MSO.I believe the majority of Windows operating systems with the following regional language settings will use the Windows 1252 codepage by default.Afrikaans, Alberian, Basque, Catalan, Danish, Dutch, English, Faroese, Finnish, French, Galician, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Scottish, Spanish, SwedishIf your language is listed above and the keys on the keyboard do not match those from the screen shot in the first post, please let me know. Thanks. Edited January 6, 2013 by czardas operator64 ArrayWorkshop 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