Jump to content

On Screen Keyboard


Go to solution Solved by RichMinichiello,

Recommended Posts

I'm in a bit of a jam and need an on screen keyboard in 64 bit WinPE. I found a few solutions that were 32 bit, but WinPE 64 doesn't have the 32 bit sub-system to run them. 

I have created a keyboard GUI and what I thought was going to be an easy Send("A") when the "A" button was pushed has really got me baffled.  When I send the "A" keystroke, it sends the "A" to the active window, which is the keyboard.  This is not what I wanted.  I looked into controlsend and anything else I could find, but it appears that all other methods will send the keystroke to a specific control or ID in another window.  I don't want to limit its functionality.  I would prefer that the GUI doesn't take focus when a button is pushed and wherever the cursor is on the focused window, that takes the key strokes. 

Any ideas?

Link to comment
Share on other sites

  • Moderators

RichMinichiello,

Take look at this thread where we discussed this very problem a few years ago. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Ha!  That's beautiful! I looked and since the OP didn't specify that it was for an on screen keyboard, I guess it didn't show up in the search results.  How would you use the magic of that project to work in an already created form?  I'll try and piece a few things together to make it work.  I'll let you know if I run into any problems.  Any ideas you can give me up front would be much appreciated.

Thank you again for the link.  It's pretty darn close to being exactly what I was looking for. 

Link to comment
Share on other sites

I'm off for now.  Got to get home.  If anyone's interested, here's my progress.  I'm still hung up with the shift on the numbers

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=some.ico
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <ButtonConstants.au3>

$MA_NOACTIVATE = 3
$MA_NOACTIVATEANDEAT = 4

; Create "keyboard" GUI
$hGUI = GUICreate("On Screen Keyboard", 587, 203, 564, 614, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_NOACTIVATE))

$dummy1 = GUICtrlCreateDummy()

$tilda = GUICtrlCreateButton("`", 0, 0, 42, 41)
$1 = GUICtrlCreateButton("1", 40, 0, 43, 41)
$2 = GUICtrlCreateButton("2", 80, 0, 43, 41)
$3 = GUICtrlCreateButton("3", 120, 0, 43, 41)
$4 = GUICtrlCreateButton("4", 160, 0, 43, 41)
$5 = GUICtrlCreateButton("5", 200, 0, 43, 41)
$6 = GUICtrlCreateButton("6", 240, 0, 43, 41)
$7 = GUICtrlCreateButton("7", 280, 0, 43, 41)
$8 = GUICtrlCreateButton("8", 320, 0, 43, 41)
$9 = GUICtrlCreateButton("9", 360, 0, 43, 41)
$0 = GUICtrlCreateButton("0", 400, 0, 43, 41)
$dash = GUICtrlCreateButton("-", 440, 0, 43, 41)
$eq = GUICtrlCreateButton("=", 480, 0, 43, 41)
$bs = GUICtrlCreateButton("Backspace", 522, 0, 59, 41)

GUICtrlCreateButton("Tab", 0, 40, 59, 41)
GUICtrlCreateButton("Q", 58, 40, 43, 41)
GUICtrlCreateButton("W", 98, 40, 43, 41)
GUICtrlCreateButton("E", 138, 40, 43, 41)
GUICtrlCreateButton("R", 178, 40, 43, 41)
GUICtrlCreateButton("T", 218, 40, 43, 41)
GUICtrlCreateButton("Y", 258, 40, 43, 41)
GUICtrlCreateButton("U", 298, 40, 43, 41)
GUICtrlCreateButton("I", 338, 40, 43, 41)
GUICtrlCreateButton("O", 378, 40, 43, 41)
GUICtrlCreateButton("P", 418, 40, 43, 41)
GUICtrlCreateButton("[", 458, 40, 43, 41)
GUICtrlCreateButton("]", 498, 40, 43, 41)
GUICtrlCreateButton("\", 538, 40, 43, 41)

GUICtrlCreateButton("", 0, 80, 75, 41)
GUICtrlCreateButton("A", 73, 80, 43, 41)
GUICtrlCreateButton("S", 113, 80, 43, 41)
GUICtrlCreateButton("D", 153, 80, 43, 41)
GUICtrlCreateButton("F", 193, 80, 43, 41)
GUICtrlCreateButton("G", 233, 80, 43, 41)
GUICtrlCreateButton("H", 273, 80, 43, 41)
GUICtrlCreateButton("J", 312, 80, 43, 41)
GUICtrlCreateButton("K", 353, 80, 43, 41)
GUICtrlCreateButton("L", 393, 80, 43, 41)
GUICtrlCreateButton(";", 433, 80, 43, 41)
GUICtrlCreateButton("'", 473, 80, 43, 41)
GUICtrlCreateButton("Enter", 514, 80, 67, 41)


GUICtrlCreateButton("Shift", 0, 120, 91, 41)
GUICtrlCreateButton("Z", 89, 120, 43, 41)
GUICtrlCreateButton("X", 129, 120, 43, 41)
GUICtrlCreateButton("C", 169, 120, 43, 41)
GUICtrlCreateButton("V", 209, 120, 43, 41)
GUICtrlCreateButton("B", 249, 120, 43, 41)
GUICtrlCreateButton("N", 289, 120, 43, 41)
GUICtrlCreateButton("M", 329, 120, 43, 41)
GUICtrlCreateButton(",", 369, 120, 43, 41)
GUICtrlCreateButton(".", 409, 120, 43, 41)
GUICtrlCreateButton("/", 449, 120, 43, 41)
GUICtrlCreateButton("", 490, 120, 91, 41)

GUICtrlCreateButton("", 0, 160, 59, 41)
GUICtrlCreateButton("L-Win", 56, 160, 59, 41, $BS_ICON)
GUICtrlSetImage(-1, "C:\Windows\windows_flag.ico", -1)
GUICtrlCreateButton("Alt", 112, 160, 59, 41)
GUICtrlCreateButton("Space", 168, 160, 187, 41)
GUICtrlCreateButton("Alt", 352, 160, 59, 41)
GUICtrlCreateButton("R-Win", 409, 160, 58, 41, $BS_ICON)
GUICtrlSetImage(-1, "C:\Windows\windows_flag.ico", -1)
GUICtrlCreateButton("", 465, 160, 51, 41)
GUICtrlCreateButton("Close", 515, 160, 66, 41)

$dummy2 = GUICtrlCreateDummy()
GUISetState()

GUIRegisterMsg($WM_MOUSEACTIVATE, 'WM_EVENTS')

;KN71Run("notepad.exe")
$Shift = 0
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            send ("{SHIFTUP}")
            Exit
        Case $dummy1 To $dummy2
            Local $sText = ControlGetText($hGUI, "", $msg)@
            ; Write key
            If $sText = "Space" Then
                Send("{SPACE}")
            ElseIf $sText = "Enter" Then
                Send("{ENTER}")
            ElseIf $sText = "L-Win" Then
                Send("{LWIN}")
            ElseIf $sText = "R-Win" Then
                Send("{RWIN}")
            ElseIf $sText = "Tab" Then
                Send("{TAB}")
            ElseIf $sText = "Backspace" Then
                send("{BS}")
            ElseIf $sText = "Shift" Then
                If $Shift = 0 Then
                    GUICtrlSetData($1,"!")
                    GUICtrlSetData($2,"@")
                    GUICtrlSetData($3,"#")
                    GUICtrlSetData($4,"$")
                    GUICtrlSetData($5,"%")
                    GUICtrlSetData($6,"^")
                    GUICtrlSetData($7,"&")
                    GUICtrlSetData($8,"*")
                    GUICtrlSetData($9,"(")
                    GUICtrlSetData($0,")")
                    GUICtrlSetData($dash,"_")
                    GUICtrlSetData($eq,"+")
                    Send("{SHIFTDOWN}")
                    $Shift = 1
                Else
                    GUICtrlSetData($1,"1")
                    GUICtrlSetData($2,"2")
                    GUICtrlSetData($3,"3")
                    GUICtrlSetData($4,"4")
                    GUICtrlSetData($5,"5")
                    GUICtrlSetData($6,"6")
                    GUICtrlSetData($7,"7")
                    GUICtrlSetData($8,"8")
                    GUICtrlSetData($9,"9")
                    GUICtrlSetData($0,"0")
                    GUICtrlSetData($dash,"-")
                    GUICtrlSetData($eq,"=")
                    send ("{SHIFTUP}")
                    $Shift = 0
                EndIf
            ElseIf $sText = "Close" Then
                send ("{SHIFTUP}")
                Exit
            Else
                Send(StringLower($sText))
            EndIf
    EndSwitch
WEnd

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
EndFunc
Edited by RichMinichiello
Link to comment
Share on other sites

I had the same problem. I ended up just hidding the keyboard for a moment then sending the key.. Being that its in WinPE(not many resources running).... you never saw the keyboard disappearing.

I have it running alright with the code I pasted above.  I am still having a few issues, though.  The number keys, when I hit the 'Shift' key, they change to the shifted number button characters...so ! for the 1 button, @ for the 2 button, # for 3, etc. 

The problem is, some of those keys, using "Send ($sText)" command, have unpredictable results.  The buttons that don't work are ! # ^ + characters.  Would there be a better way of detecting those buttons being pressed and send a different command?

Edited by RichMinichiello
Link to comment
Share on other sites

  • Moderators

RichMinichiello,

Look at the Help file page for Send - those characters are the "modifiers" which simulate the simultaneous pressing of the Alt ( ! ), Windows (#), Ctrl (^), & Shift (+) keys. You need to use the "Raw" flag to get AutoIt to send them as the actual keys. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

RichMinichiello,

Look at the Help file page for Send - those characters are the "modifiers" which simulate the simultaneous pressing of the Alt ( ! ), Windows (#), Ctrl (^), & Shift (+) keys. You need to use the "Raw" flag to get AutoIt to send them as the actual keys. :)

M23

 I was on that page 'discovering' that and you replied just before I hit the "Post"!  Thank you!!  I'll let you know when it's done.

Edited by RichMinichiello
Link to comment
Share on other sites

  • Solution

Alright, here it is!  I think this is pretty good!  Let me know if you think it needs anything else:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <ButtonConstants.au3>

;$WS_EX_NOACTIVATE = 0x08000000
$MA_NOACTIVATE = 3
$MA_NOACTIVATEANDEAT = 4



; Create "keyboard" GUI
$hGUI = GUICreate("On Screen Keyboard - v. 14.3.17", 587, 203, 564, 614, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_NOACTIVATE))

$dummy1 = GUICtrlCreateDummy()

$tilda = GUICtrlCreateButton("`", 0, 0, 42, 41)
$1 = GUICtrlCreateButton("1", 40, 0, 43, 41)
$2 = GUICtrlCreateButton("2", 80, 0, 43, 41)
$3 = GUICtrlCreateButton("3", 120, 0, 43, 41)
$4 = GUICtrlCreateButton("4", 160, 0, 43, 41)
$5 = GUICtrlCreateButton("5", 200, 0, 43, 41)
$6 = GUICtrlCreateButton("6", 240, 0, 43, 41)
$7 = GUICtrlCreateButton("7", 280, 0, 43, 41)
$8 = GUICtrlCreateButton("8", 320, 0, 43, 41)
$9 = GUICtrlCreateButton("9", 360, 0, 43, 41)
$0 = GUICtrlCreateButton("0", 400, 0, 43, 41)
$dash = GUICtrlCreateButton("-", 440, 0, 43, 41)
$eq = GUICtrlCreateButton("=", 480, 0, 43, 41)
$bs = GUICtrlCreateButton("Backspace", 522, 0, 59, 41)

GUICtrlCreateButton("Tab", 0, 40, 59, 41)
$q = GUICtrlCreateButton("q", 58, 40, 43, 41)
$w = GUICtrlCreateButton("w", 98, 40, 43, 41)
$e = GUICtrlCreateButton("e", 138, 40, 43, 41)
$r = GUICtrlCreateButton("r", 178, 40, 43, 41)
$t = GUICtrlCreateButton("t", 218, 40, 43, 41)
$y = GUICtrlCreateButton("y", 258, 40, 43, 41)
$u = GUICtrlCreateButton("u", 298, 40, 43, 41)
$i = GUICtrlCreateButton("i", 338, 40, 43, 41)
$o = GUICtrlCreateButton("o", 378, 40, 43, 41)
$p = GUICtrlCreateButton("p", 418, 40, 43, 41)
$OpenBracket = GUICtrlCreateButton("[", 458, 40, 43, 41)
$CloseBracket = GUICtrlCreateButton("]", 498, 40, 43, 41)
$BkSlash = GUICtrlCreateButton("\", 538, 40, 43, 41)

GUICtrlCreateButton("", 0, 80, 75, 41)
$a = GUICtrlCreateButton("a", 73, 80, 43, 41)
$s = GUICtrlCreateButton("s", 113, 80, 43, 41)
$d = GUICtrlCreateButton("d", 153, 80, 43, 41)
$f = GUICtrlCreateButton("f", 193, 80, 43, 41)
$g = GUICtrlCreateButton("g", 233, 80, 43, 41)
$h = GUICtrlCreateButton("h", 273, 80, 43, 41)
$j = GUICtrlCreateButton("j", 312, 80, 43, 41)
$k = GUICtrlCreateButton("k", 353, 80, 43, 41)
$l = GUICtrlCreateButton("l", 393, 80, 43, 41)
$semicolon = GUICtrlCreateButton(";", 433, 80, 43, 41)
$quotes = GUICtrlCreateButton("'", 473, 80, 43, 41)
GUICtrlCreateButton("Enter", 514, 80, 67, 41)


GUICtrlCreateButton("Shift", 0, 120, 91, 41)
$z = GUICtrlCreateButton("z", 89, 120, 43, 41)
$x = GUICtrlCreateButton("x", 129, 120, 43, 41)
$c = GUICtrlCreateButton("c", 169, 120, 43, 41)
$v = GUICtrlCreateButton("v", 209, 120, 43, 41)
$b = GUICtrlCreateButton("b", 249, 120, 43, 41)
$n = GUICtrlCreateButton("n", 289, 120, 43, 41)
$m = GUICtrlCreateButton("m", 329, 120, 43, 41)
$comma = GUICtrlCreateButton(",", 369, 120, 43, 41)
$Period = GUICtrlCreateButton(".", 409, 120, 43, 41)
$FrontSlash = GUICtrlCreateButton("/", 449, 120, 43, 41)
GUICtrlCreateButton("", 490, 120, 91, 41)

GUICtrlCreateButton("", 0, 160, 59, 41)
GUICtrlCreateButton("L-Win", 56, 160, 59, 41, $BS_ICON)
GUICtrlSetImage(-1, "C:\Windows\windows_flag.ico", -1)
GUICtrlCreateButton("Alt", 112, 160, 59, 41)
GUICtrlCreateButton("Space", 168, 160, 187, 41)
GUICtrlCreateButton("Alt", 352, 160, 59, 41)
GUICtrlCreateButton("R-Win", 409, 160, 58, 41, $BS_ICON)
GUICtrlSetImage(-1, "C:\Windows\windows_flag.ico", -1)
GUICtrlCreateButton("", 465, 160, 51, 41)
GUICtrlCreateButton("Close", 515, 160, 66, 41)

$dummy2 = GUICtrlCreateDummy()
GUISetState()

GUIRegisterMsg($WM_MOUSEACTIVATE, 'WM_EVENTS')

;KN71Run("notepad.exe")
$Shift = 0
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            send ("{SHIFTUP}")
            Exit
        Case $dummy1 To $dummy2
            Local $sText = ControlGetText($hGUI, "", $msg)
            ; Write key
            If $sText = "Space" Then
                Send("{SPACE}")
            ElseIf $sText = "Enter" Then
                Send("{ENTER}")
            ElseIf $sText = "L-Win" Then
                Send("{LWIN}")
            ElseIf $sText = "R-Win" Then
                Send("{RWIN}")
            ElseIf $sText = "Tab" Then
                Send("{TAB}")
            ElseIf $sText = "Backspace" Then
                send("{BS}")
            ElseIf $sText = "Shift" Then
                If $Shift = 0 Then
                    GUICtrlSetData($tilda,"~")
                    GUICtrlSetData($1,"!")
                    GUICtrlSetData($2,"@")
                    GUICtrlSetData($3,"#")
                    GUICtrlSetData($4,"$")
                    GUICtrlSetData($5,"%")
                    GUICtrlSetData($6,"^")
                    GUICtrlSetData($7,'&&')
                    GUICtrlSetData($8,"*")
                    GUICtrlSetData($9,"(")
                    GUICtrlSetData($0,")")
                    GUICtrlSetData($dash,"_")
                    GUICtrlSetData($eq,"+")

                    GUICtrlSetData($q,"Q")
                    GUICtrlSetData($w,"W")
                    GUICtrlSetData($e,"E")
                    GUICtrlSetData($r,"R")
                    GUICtrlSetData($t,"T")
                    GUICtrlSetData($y,"Y")
                    GUICtrlSetData($u,"U")
                    GUICtrlSetData($i,"I")
                    GUICtrlSetData($o,"O")
                    GUICtrlSetData($p,"P")
                    GUICtrlSetData($OpenBracket,"{")
                    GUICtrlSetData($CloseBracket,"}")
                    GUICtrlSetData($BkSlash,"|")

                    GUICtrlSetData($a,"A")
                    GUICtrlSetData($s,"S")
                    GUICtrlSetData($d,"D")
                    GUICtrlSetData($f,"F")
                    GUICtrlSetData($g,"G")
                    GUICtrlSetData($h,"H")
                    GUICtrlSetData($j,"J")
                    GUICtrlSetData($k,"K")
                    GUICtrlSetData($l,"L")
                    GUICtrlSetData($semicolon,":")
                    GUICtrlSetData($quotes,'"')

                    GUICtrlSetData($z,"Z")
                    GUICtrlSetData($x,"X")
                    GUICtrlSetData($c,"C")
                    GUICtrlSetData($v,"V")
                    GUICtrlSetData($b,"B")
                    GUICtrlSetData($n,"N")
                    GUICtrlSetData($m,"M")
                    GUICtrlSetData($comma,"<")
                    GUICtrlSetData($Period,">")
                    GUICtrlSetData($FrontSlash,"?")


;~                  Send("{SHIFTDOWN}")
                    $Shift = 1
                Else
                    GUICtrlSetData($tilda,"`")
                    GUICtrlSetData($1,"1")
                    GUICtrlSetData($2,"2")
                    GUICtrlSetData($3,"3")
                    GUICtrlSetData($4,"4")
                    GUICtrlSetData($5,"5")
                    GUICtrlSetData($6,"6")
                    GUICtrlSetData($7,"7")
                    GUICtrlSetData($8,"8")
                    GUICtrlSetData($9,"9")
                    GUICtrlSetData($0,"0")
                    GUICtrlSetData($dash,"-")
                    GUICtrlSetData($eq,"=")

                    GUICtrlSetData($q,"q")
                    GUICtrlSetData($w,"w")
                    GUICtrlSetData($e,"e")
                    GUICtrlSetData($r,"r")
                    GUICtrlSetData($t,"t")
                    GUICtrlSetData($y,"y")
                    GUICtrlSetData($u,"u")
                    GUICtrlSetData($i,"i")
                    GUICtrlSetData($o,"o")
                    GUICtrlSetData($p,"p")
                    GUICtrlSetData($OpenBracket,"[")
                    GUICtrlSetData($CloseBracket,"]")
                    GUICtrlSetData($BkSlash,"\")

                    GUICtrlSetData($a,"a")
                    GUICtrlSetData($s,"s")
                    GUICtrlSetData($d,"d")
                    GUICtrlSetData($f,"f")
                    GUICtrlSetData($g,"g")
                    GUICtrlSetData($h,"h")
                    GUICtrlSetData($j,"j")
                    GUICtrlSetData($k,"k")
                    GUICtrlSetData($l,"l")
                    GUICtrlSetData($semicolon,";")
                    GUICtrlSetData($quotes,"'")

                    GUICtrlSetData($z,"z")
                    GUICtrlSetData($x,"x")
                    GUICtrlSetData($c,"c")
                    GUICtrlSetData($v,"v")
                    GUICtrlSetData($b,"b")
                    GUICtrlSetData($n,"n")
                    GUICtrlSetData($m,"m")
                    GUICtrlSetData($comma,",")
                    GUICtrlSetData($Period,".")
                    GUICtrlSetData($FrontSlash,"/")

                    $Shift = 0
                EndIf
            ElseIf $sText = "Close" Then
                ;send ("{SHIFTUP}")
                Exit
            Else
                if $sText = '&&' Then
                    send('&')
                Else
                    Send($sText,1)
                EndIf
            EndIf
    EndSwitch
WEnd

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
EndFunc
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...