Jump to content

Control Handle under mouse


bo8ster
 Share

Recommended Posts

Thanks for the comment. I use Local $a_wfp = DllCall("user32.dll", "hwnd", "WindowFromPoint", "long", $a_mpos[0], "long", $a_mpos[1]) to get the mouse pos then translate that to client screen ( DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $h_wnd, "ptr", DllStructGetPtr($t_point)) ) to get more accurate info. This was done as SmOke_N recommending doing so.

have a look at the UDF to learn more.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

  • 1 month later...

Hi.

I hoped that this method can get the correct handle (and the ClassNN) of the currently hovered control, but it's also failed on some windows. For example, hover the Opera browser window controls, you will see that the returned handle (and the ClassNN as a result) does not match the real one (as we can see in «AutoIt Window Info» Tool).

So i think the problem is in the WindowFromPoint function, but the question is, how «AutoIt Window Info» Tool get the handle, what used there?

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 3 weeks later...

@MrCreator - I have played with the function for some time trying to get it worked on non-maximized window and can only manage to get it to work when client coords are taken out (no conversion is done)but I believe that reduces accuracy or if ClassNN is disabled.

I have no idea how AutoIt Window Info does it but I would like to know. I would guess, (thinking out loud) screen coords are translated into client coords instead of the other way round.

I'll have a stab at that some other time though.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

  • 6 months later...

Updated to work with any window, maximised or not. This now works nearly as good as the AutoIt Window Info tool.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

Hi, very usefull script indeed. thanks.

The script is missing the "MyExit" function.

Thanks for that, function added to the script.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

  • 9 months later...

This little tidbit script works great, especially when you just make a quick script w/o a GUI. however, i see it doesn't return the ID's of any disabled controls.

Any way around that one, so that it can return the handles and locations of disabled controls as well?

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

This little tidbit script works great, especially when you just make a quick script w/o a GUI. however, i see it doesn't return the ID's of any disabled controls.

Any way around that one, so that it can return the handles and locations of disabled controls as well?

I found the issue, "WindowFromPoint function does not retrieve a handle to a hidden or disabled window, even if the point is within the window" (From MSDN). I need to use ChildWindowFromPoint as it is less restrictive however its not as simple as changing the function call.

I'll try to work out.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

I found the issue, "WindowFromPoint function does not retrieve a handle to a hidden or disabled window, even if the point is within the window" (From MSDN). I need to use ChildWindowFromPoint as it is less restrictive however its not as simple as changing the function call.

I'll try to work out.

Using the code that martin posted, here's the adapted script to highlight even disabled controls:

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>

Opt("GuiOnEventMode", 1)
HotKeySet("{ESC}", "QuitApp")
$dll = dllopen("user32.dll")

If Not IsDeclared("WM_WINDOWPOSCHANGED") Then Assign("WM_WINDOWPOSCHANGED",0x0047)
Global $ahGUI[4]
Global $Last_hControl = -1
Global $Frame_Color = 0xff0000;0xFF0000
Global $Frame_Width = 2
Global $hCtrl
GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED")



While 1
    $hCtrl = WindowFromPoint()
    If $hCtrl <> 0 And $Last_hControl <> $hCtrl And Not IsHighLight_GUIs($hCtrl) Then
        if not _IsPressed("1") Then
            $Last_hControl = $hCtrl
            $aCtrlPos = WinGetPos($hCtrl)
            GUISquareDelete()
            GUICreateSquare($aCtrlPos[0], $aCtrlPos[1], $aCtrlPos[2], $aCtrlPos[3])
        EndIf
    Else
        $aNewCtrlPos = WinGetPos($hCtrl)
        for $n = 0 to 3
            if $aCtrlPos[$n] <> $aNewCtrlPos[$n] Then
                GUISquareDelete()
                $hCtrl = 0
                $Last_hControl = 0
                ExitLoop
            EndIf
        Next
    EndIf
WEnd

Func GUICreateSquare($X, $Y, $W, $H)
    $X -= $Frame_Width
    $Y -= $Frame_Width
    $W += $Frame_Width
    $H += $Frame_Width
    $ahGUI[0] = GUICreate("", $W, $Frame_Width, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW)
    GUISetBkColor($Frame_Color)
    $ahGUI[1] = GUICreate("", $Frame_Width, $H, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW)
    GUISetBkColor($Frame_Color)
    $ahGUI[2] = GUICreate("", $Frame_Width, $H, $X+$W, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW)
    GUISetBkColor($Frame_Color)
    $ahGUI[3] = GUICreate("", $W+$Frame_Width, $Frame_Width, $X, $Y+$H, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW)
    GUISetBkColor($Frame_Color)
    For $i = 0 To 3
        GUISetState(@SW_SHOW, $ahGUI[$i])
    Next
EndFunc

Func GUISquareDelete()
    For $i = 0 To 3
        If IsHWnd($ahGUI[$i]) Then GUIDelete($ahGUI[$i])
    Next
    $ahGUI = ""
    Dim $ahGUI[4]
EndFunc

Func IsHighLight_GUIs($hCtrl)
    For $i = 0 To 3
        If $ahGUI[$i] = $hCtrl Then Return True
    Next
    Return False
EndFunc

Func WindowFromPoint()
    Local $point, $cHwnd, $hwnd, $pos, $size
    $point = MouseGetPos()
    $hwnd = DLLCall($dll, "hwnd", "WindowFromPoint", "int", $point[0], "int", $point[1])
    If $hwnd[0] <> 0 Then
        $pos = WinGetPos($hwnd[0])
        If @error Then Return 0
        $size = WinGetClientSize($hwnd[0])
        If @error Then Return 0
        $pos[0] += (($pos[2] - $size[0]) / 2)
        $pos[1] += (($pos[3] - $size[1]) - (($pos[2] - $size[0]) / 2))
        $cHwnd = DLLCall($dll,"hwnd","RealChildWindowFromPoint","hwnd",$hwnd[0], _
                    "int",$point[0] - $pos[0],"int",$point[1] - $pos[1])
        If $cHwnd[0] <> 0 Then $hwnd[0] = $cHwnd[0]
    EndIf
   Return $hwnd[0]
EndFunc


Func WM_WINDOWPOSCHANGED($hWndGUI, $MsgID, $WParam, $LParam)
    If  $hWndGUI = $hCtrl Then
        GUISquareDelete()
        $Last_hControl = -1
    Else
        Return $GUI_RUNDEFMSG
    EndIf
EndFunc

Func QuitApp()
    DllClose($dll)
    Exit
EndFunc

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

Thanks for the post, I shall try to put it into my script. The main issue is the relation between the parent handle and the control handle. The right handle has to be used to extract the correct information, too high or too low in the Z order and it won't work.

Can you please post the link to the thread where you martin's script.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

I have made some updates to incoperate the supplied script with my own. Give it a run and see if it meets your needs. I tested it with disabled buttons on the Calculate program verifying it against the AutoIt info tool.

Changes: Uses a different method to get the control handle and has added control highlighting. This can be removed it not required.

; ===============================================================================
;~ This script gets the control under the mouse pointer (active or inactive)
;~ The information then can be used with in conjunction with control functions.
;~ Requires AutoIt v3.3.6.0 or later to run and to view apps maximized.
;~ Big thanks to SmOke_N and Valik their help in creating it.
; ===============================================================================
#include <WinAPI.au3>
#include <Array.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <Misc.au3>

AutoItSetOption("MustDeclareVars", 1)
Opt("GuiOnEventMode", 1)
;~ AutoItSetOption("MouseCoordMode", 1)
AdlibRegister("_Mouse_Control_GetInfoAdlib", 10)
HotKeySet("^!x", "MyExit") ; Press Ctrl+Alt+x to stop the script
HotKeySet("{ESC}", "MyExit")
;~ #AutoIt3Wrapper_run_debug_mode=Y

Global $ahGUI[4]
Global $Frame_Color = 0xff0000;0xFF0000
Global $Frame_Width = 2

Global $pos1 = MouseGetPos()
Global $pos2 = MouseGetPos() ; must be initialized
Global $appHandle = 0
Global $dll = DllOpen("user32.dll")

While 1
    Sleep(0xFFFFFFF)
WEnd

; ===============================================================================
;~ Retrieves the information of a Control located under the mouse and displayes it in a tool tip next to the mouse.
;~ Function uesd
;~  _Mouse_Control_GetInfo()
;~  GetDlgCtrlID
; ===============================================================================
Func _Mouse_Control_GetInfoAdlib()
    Local $Last_hControl = 0
    Local $aCtrlPos[4], $aNewCtrlPos[4]
    $pos1 = MouseGetPos()
    If $pos1[0] <> $pos2[0] Or $pos1[1] <> $pos2[1] Then ; has the mouse moved?
        Local $a_info = _Mouse_Control_GetInfo()
        Local $aDLL = DllCall('User32.dll', 'int', 'GetDlgCtrlID', 'hwnd', $a_info[0]) ; get the ID of the control
        If @error Then Return
        ToolTip("Handle = " & $a_info[0] & @CRLF & _
                "Class = " & $a_info[1] & @CRLF & _
                "ID = " & $aDLL[0] & @CRLF & _
                "Mouse X Pos = " & $a_info[2] & @CRLF & _
                "Mouse Y Pos = " & $a_info[3] & @CRLF & _
                "ClassNN = " & $a_info[4] & @CRLF & _ ; optional
                "Parent Hwd = " & _WinAPI_GetAncestor($appHandle, $GA_ROOT))
        $pos2 = MouseGetPos()
        ; Highlighting
        If $a_info[0] <> 0 And $Last_hControl <> $a_info[0] And Not IsHighLight_GUIs($a_info[0]) Then
            If Not _IsPressed("1") Then
                $Last_hControl = $a_info[0]
                $aCtrlPos = WinGetPos($a_info[0])
                GUISquareDelete()
                GUICreateSquare($aCtrlPos[0], $aCtrlPos[1], $aCtrlPos[2], $aCtrlPos[3])
            EndIf
        Else
            $aNewCtrlPos = WinGetPos($a_info[0])
            For $n = 0 To 3
                If $aCtrlPos[$n] <> $aNewCtrlPos[$n] Then
                    GUISquareDelete()
                    $a_info[0] = 0
                    $Last_hControl = 0
                    ExitLoop
                EndIf
            Next

        EndIf
    EndIf
EndFunc   ;==>_Mouse_Control_GetInfoAdlib

; ===============================================================================
;~ Retrieves the information of a Control located under the mouse.
;~ Uses Windows functions WindowFromPoint and GetClassName to retrieve the information.
;~ Functions used
;~  WindowFromPoint()
;~  _ControlGetClassnameNN()
;~ Returns
;~   [0] = Control Handle of the control
;~   [1] = The Class Name of the control
;~   [2] = Mouse X Pos (converted to Screen Coord)
;~   [3] = Mouse Y Pos (converted to Screen Coord)
;~   [4] = ClassNN
; ===============================================================================
Func _Mouse_Control_GetInfo()
    Local $client_mpos = $pos1 ; gets client coords because of "MouseCoordMode" = 2
    Local $a_mpos
    Local $point, $cHwnd, $pos, $size
;~  Call to removed due to offset issue $a_mpos = _ClientToScreen($appHandle, $client_mpos[0], $client_mpos[1]) ; $a_mpos now screen coords
    $a_mpos = $client_mpos
;~  $appHandle = GetHoveredHwnd($client_mpos[0], $client_mpos[1]) ; Uses the mouse to do the equivalent of WinGetHandle()

    Local $h_control = WindowFromPoint($a_mpos)
    $appHandle = _WinAPI_GetAncestor($h_control, $GA_ROOT)

    If @error Then Return SetError(2, 0, 0)
    Local $t_class = DllStructCreate("char[260]")
    DllCall("User32.dll", "int", "GetClassName", "hwnd", $h_control, "ptr", DllStructGetPtr($t_class), "int", 260)
    Local $a_ret[5] = [$h_control, DllStructGetData($t_class, 1), $a_mpos[0], $a_mpos[1], "none"]
    Local $sClassNN = _ControlGetClassnameNN($a_ret[0]) ; optional, will run faster without it
    $a_ret[4] = $sClassNN

    Return $a_ret
EndFunc   ;==>_Mouse_Control_GetInfo


; ===============================================================================
; Retrives the a handle to a control or window.
; Created by martin in an unknown thread
; Params
;   $point - the mouse coords
; ===============================================================================
Func WindowFromPoint($point)
    Local $cHwnd, $hwnd, $pos, $size
    $point = MouseGetPos()
    $hwnd = DllCall($dll, "hwnd", "WindowFromPoint", "int", $point[0], "int", $point[1])
    If $hwnd[0] <> 0 Then
        $pos = WinGetPos($hwnd[0])
        If @error Then Return 0
        $size = WinGetClientSize($hwnd[0])
        If @error Then Return 0
        $pos[0] += (($pos[2] - $size[0]) / 2)
        $pos[1] += (($pos[3] - $size[1]) - (($pos[2] - $size[0]) / 2))
        $cHwnd = DllCall($dll, "hwnd", "RealChildWindowFromPoint", "hwnd", $hwnd[0], _
                "int", $point[0] - $pos[0], "int", $point[1] - $pos[1])
        If $cHwnd[0] <> 0 Then $hwnd[0] = $cHwnd[0]
    EndIf
    Return $hwnd[0]
EndFunc   ;==>WindowFromPoint

; ===============================================================================
; Retrieves the Handle of GUI/Application the mouse is over.
; Similar to WinGetHandle except it used the current mouse position
; Taken from http://www.autoitscript.com/forum/index.php?showtopic=444962
; Changed to take params to allow only one set of coords to be used.
; Params
;~  $i_xpos - x position of the mouse - usually from MouseGetPos(0)
;~  $i_ypos - x position of the mouse - usually from MouseGetPos(1)
; ===============================================================================
Func GetHoveredHwnd($i_xpos, $i_ypos)
    Local $iRet = DllCall("user32.dll", "int", "WindowFromPoint", "long", $i_xpos, "long", $i_ypos)
    If IsArray($iRet) Then
        $appHandle = $iRet[0]
        Return HWnd($iRet[0])
    Else
        Return SetError(1, 0, 0)
    EndIf
EndFunc   ;==>GetHoveredHwnd

; ===============================================================================
;~ Gets the ClassNN of a control (Classname and Instance Count). This is checked with ControlGetHandle
;~ The instance is really a way to uniquely identify classes with the same name
;~ Big thanks to Valik for writing the function, taken from - http://www.autoitscript.com/forum/index.php?showtopic=97662
;~ Param
;~  $hControl - the control handle from which you want the ClassNN
;~ Returns
;~  the ClassNN of the given control

; ===============================================================================
Func _ControlGetClassnameNN($hControl)
    If Not IsHWnd($hControl) Then Return SetError(1, 0, "")
    Local Const $hParent = _WinAPI_GetAncestor($appHandle, $GA_ROOT) ; get the Window handle, this is set in GetHoveredHwnd()
    If Not $hParent Then Return SetError(2, 0, "")

    Local Const $sList = WinGetClassList($hParent) ; list of every class in the Window
    Local $aList = StringSplit(StringTrimRight($sList, 1), @LF, 2)
    _ArraySort($aList) ; improves speed
    Local $nInstance, $sLastClass, $sComposite

    For $i = 0 To UBound($aList) - 1
        If $sLastClass <> $aList[$i] Then ; set up the first occurrence of a unique classname
            $sLastClass = $aList[$i]
            $nInstance = 1
        EndIf
        $sComposite = $sLastClass & $nInstance ;build the ClassNN for testing with ControlGetHandle. ClassNN = Class & ClassCount
        ;if ControlGetHandle(ClassNN) matches the given control return else look at the next instance of the classname
        If ControlGetHandle($hParent, "", $sComposite) = $hControl Then
            Return $sComposite
        EndIf
        $nInstance += 1 ; count the number of times the class name appears in the list
    Next
    Return SetError(3, 0, "")

EndFunc   ;==>_ControlGetClassnameNN

; ===============================================================================
;~ Creates a read square around the control
; ===============================================================================
Func GUICreateSquare($X, $Y, $W, $H)
    $X -= $Frame_Width
    $Y -= $Frame_Width
    $W += $Frame_Width
    $H += $Frame_Width
    $ahGUI[0] = GUICreate("", $W, $Frame_Width, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
    GUISetBkColor($Frame_Color)
    $ahGUI[1] = GUICreate("", $Frame_Width, $H, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
    GUISetBkColor($Frame_Color)
    $ahGUI[2] = GUICreate("", $Frame_Width, $H, $X + $W, $Y, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
    GUISetBkColor($Frame_Color)
    $ahGUI[3] = GUICreate("", $W + $Frame_Width, $Frame_Width, $X, $Y + $H, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
    GUISetBkColor($Frame_Color)
    For $i = 0 To 3
        GUISetState(@SW_SHOW, $ahGUI[$i])
    Next
EndFunc   ;==>GUICreateSquare

; ===============================================================================
;~ Removed the read square around the control created by GUICreateSquare
; ===============================================================================
Func GUISquareDelete()
    For $i = 0 To 3
        If IsHWnd($ahGUI[$i]) Then GUIDelete($ahGUI[$i])
    Next
    $ahGUI = ""
    Dim $ahGUI[4]
EndFunc   ;==>GUISquareDelete

; ===============================================================================
;~ Determines if the control is highlighted
; ===============================================================================
Func IsHighLight_GUIs($hCtrl)
    For $i = 0 To 3
        If $ahGUI[$i] = $hCtrl Then Return True
    Next
    Return False
EndFunc   ;==>IsHighLight_GUIs

Func MyExit() ; stops the script
    ConsoleWrite("Script Stoppted By User" & @CR)
    DllClose($dll)
    Exit
EndFunc   ;==>MyExit

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

  • 9 months later...

Hi, bo8ster

Do you know the reason of the question in this topic

Of course, I can use x86 version. But I need one part of this script to get the Class to put it in my script (need to get a class at which a left mouse is clicked). And my own script only work in x64.....

Edited by hodgestructure
Link to comment
Share on other sites

  • 7 years later...

As a total noob I would love to know how to redirect the output to a separate window. So what's now shown as a tooltip should be visible in an additional GUI.

Can anybody give me a hint?

 

Thanks in advance.

Lars

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...