yeto Posted October 1, 2020 Posted October 1, 2020 Is it possible, with AutoIt, to create an on-screen keyboard that only has 3 keys (Shift, Ctrl and Alt)? I would like to be able to click on these keys and "fool" my computer into thinking I am holding these keys down.
Nine Posted October 1, 2020 Posted October 1, 2020 Yes quite easily. Open help file, and carefully read the description of the Send() function. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
funkey Posted October 2, 2020 Posted October 2, 2020 I just had some time left. expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> Global $hGui = GUICreate("Keyboard", 170, 50, -1, -1, -1, $WS_EX_TOPMOST) Global $Shift = GUICtrlCreateCheckbox("Shift", 5, 5, 50, 40, $BS_PUSHLIKE) Global $Ctrl = GUICtrlCreateCheckbox("Ctrl", 60, 5, 50, 40, $BS_PUSHLIKE) Global $Alt = GUICtrlCreateCheckbox("Alt", 115, 5, 50, 40, $BS_PUSHLIKE) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $Shift If _IsChecked($Shift) Then Send("{SHIFTDOWN}") Else Send("{SHIFTUP}") EndIf Case $Ctrl If _IsChecked($Ctrl) Then Send("{CTRLDOWN}") Else Send("{CTRLUP}") EndIf Case $Alt If _IsChecked($Alt) Then Send("{ALTDOWN}") Else Send("{ALTUP}") EndIf EndSwitch WEnd Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
yeto Posted October 2, 2020 Author Posted October 2, 2020 (edited) 7 hours ago, funkey said: I just had some time left. expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> Global $hGui = GUICreate("Keyboard", 170, 50, -1, -1, -1, $WS_EX_TOPMOST) Global $Shift = GUICtrlCreateCheckbox("Shift", 5, 5, 50, 40, $BS_PUSHLIKE) Global $Ctrl = GUICtrlCreateCheckbox("Ctrl", 60, 5, 50, 40, $BS_PUSHLIKE) Global $Alt = GUICtrlCreateCheckbox("Alt", 115, 5, 50, 40, $BS_PUSHLIKE) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $Shift If _IsChecked($Shift) Then Send("{SHIFTDOWN}") Else Send("{SHIFTUP}") EndIf Case $Ctrl If _IsChecked($Ctrl) Then Send("{CTRLDOWN}") Else Send("{CTRLUP}") EndIf Case $Alt If _IsChecked($Alt) Then Send("{ALTDOWN}") Else Send("{ALTUP}") EndIf EndSwitch WEnd Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked This is great. I have never done any coding and I have been reading on how to do this. I have SciTE 4.1.2 but I don't see Koda under tools (which I understand I would have needed to make this script). So do I now copy this code into SciTE and press F5 and the code will run or do I need to compile the code somehow first. I appreciate you taking time to do this. I am sure this will save me hours and hours of frustration and research. I am still going to study what you have provided as I want to learn how to code. Also, would you have any idea as to why Koda is not showing up in my SciTE 4.1.2? Again, thank you, yeto Edited October 2, 2020 by yeto
Developers Jos Posted October 2, 2020 Developers Posted October 2, 2020 Install the Full Installer of SciTE4AutoIt3 to get these extra's. 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.
yeto Posted October 3, 2020 Author Posted October 3, 2020 8 hours ago, Jos said: Install the Full Installer of SciTE4AutoIt3 to get these extra's. I am getting the following error message: "This installer requires the AutoIt3 production release to be installed first. Stopping installation." Where do I go to get the "AutoIt3 production release"?
Developers Jos Posted October 3, 2020 Developers Posted October 3, 2020 So that means you haven't installed AutoIt3 with the installer? 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.
yeto Posted October 3, 2020 Author Posted October 3, 2020 7 hours ago, Jos said: So that means you haven't installed AutoIt3 with the installer? Thank you. That worked. Everything is working fine now.
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