Jump to content

Search the Community

Showing results for tags 'on screen keyboard'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi. I'm trying to create a custom On Screen Keyboard based on some of the examples in the forum, and the one I've used works perfectly when I'm using it with a mouse to click the buttons. I'm coding a little script that will be running on a Windows 8.1 tablet and when I try to run a On Screen Keyboard example it repeates the keystrokes. If I want to type "3" and I click with my finger on the button "3", it types a "3". If then I click on another button the OSK types again the "3" and then the new number that I typed before This is the code I'm using as a base: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <ButtonConstants.au3> ;$WS_EX_NOACTIVATE = 0x08000000 $MA_NOACTIVATE = 3 $MA_NOACTIVATEANDEAT = 4 HotKeySet("{ESC}", "On_Exit") Global $aKeys[48] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", _ "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "[", "]", _ "A", "S", "D", "F", "G", "H", "J", "K", "L", ";", "'", '"', _ "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "spc", "enter"] ; Create "keyboard" GUI $hGUI = GUICreate("Test", 360, 120, 500, 100, $WS_POPUPWINDOW, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_NOACTIVATE)) $dummy1 = GUICtrlCreateDummy() $iCount = 0 For $j = 0 To 3 For $i = 0 To 11 GUICtrlCreateButton("", $i * 30, $j * 30, 30, 30) GUICtrlSetData(-1, $aKeys[$iCount]) $iCount += 1 ;~ GUICtrlSetFont(-1, 10) ;~ GUICtrlSetBkColor(-1, 30000 + 2000 * ($i + 1) + 2000 * ($j + 1)) Next Next $dummy2 = GUICtrlCreateDummy() GUISetState() GUIRegisterMsg($WM_MOUSEACTIVATE, 'WM_EVENTS') Run("notepad.exe") While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $dummy1 To $dummy2 Local $sText = ControlGetText($hGUI, "", $msg) ; Write key If $sText = "spc" Then Send("{SPACE}") ElseIf $sText = "enter" Then Send("{ENTER}") Else Send($sText) EndIf EndSwitch WEnd Func On_Exit() Exit EndFunc Func WM_EVENTS($hWndGUI, $MsgID, $WParam, $LParam) Switch $hWndGUI Case $hGUI Switch $MsgID Case $WM_MOUSEACTIVATE ; Check mouse position Local $aMouse_Pos = GUIGetCursorInfo($hGUI) If $aMouse_Pos[4] <> 0 Then Local $word = _WinAPI_MakeLong($aMouse_Pos[4], $BN_CLICKED) _SendMessage($hGUI, $WM_COMMAND, $word, GUICtrlGetHandle($aMouse_Pos[4])) EndIf Return $MA_NOACTIVATEANDEAT EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFuncI don't have any other Windows' touch screen device to test, so if any of you can try the script I would trully apreciatte any feedback. Maybe in touch screens the system handles in a different way the mouse click and the scripts fails... I don't know Greets from Barcelona
×
×
  • Create New...