Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/24/2021 in all areas

  1. Thanks for chiming in. I want to add a couple of things to this puzzle: First, I've now used the Au3 Inspection Tool to confirm that, indeed, the buttons are completely gone from the GUI. What were (initially ) identified as "Button 1, 2, 3 ... etc., don't show anything at all, once they've disappeared. Second, I opened the FlatButton UDF, itself, and found this ominous line of code: OnAutoItExitRegister("GUIFlatButton_Exit") This button exit function specifically deletes each of a GUIs defined buttons. Given that Au3's function can be triggered by any of 5 different actions, it opens the possibility (to me) of some extraneous operation within the FlatButton UDF. So I have to ask: Do Flat Buttons require the _Exit? ... or will they be deleted by the normal Au3 GUI close processing?
    1 point
  2. InnI

    Controlclick on Zbutton?

    ControlSend($hWnd, "", "ZButton22", "{space}") ; or ControlCommand($hWnd, "", "ZButton22", "SendCommandID", 0xF5) ; $BM_CLICK
    1 point
  3. Earthshine

    Controlclick on Zbutton?

    Control click will never work on the lock screen
    1 point
  4. Confirmed as fixed. Here is my modified version Func _GUICtrlTreeView_ClickItem64($hwnd, $hItem, $sButton = "left", $bMove = False, $iClicks = 1, $iSpeed = 0) ;~ https://www.autoitscript.com/forum/topic/198379-_guictrltreeview_clickitem-issues/?do=findComment&comment=1480466 If @OSArch <> "X64" Then Local $iResult_temp = _GUICtrlTreeView_ClickItem($hwnd, $hItem, $sButton, $bMove, $iClicks, $iSpeed) Return SetError(@error, @extended, $iResult_temp) EndIf If Not IsHWnd($hwnd) Then $hwnd = GUICtrlGetHandle($hwnd) Local $tRECT = _GUICtrlTreeView_DisplayRectEx64($hwnd, $hItem, True) If @error Then Return SetError(@error, @error, 0) ; Always click on the left-most portion of the control, not the center. A ; very wide control may be off-screen which means clicking on it's center ; will click outside the window. Local $tPoint = _WinAPI_PointFromRect($tRECT, False) _WinAPI_ClientToScreen($hwnd, $tPoint) Local $iX, $iY _WinAPI_GetXYFromPoint($tPoint, $iX, $iY) Local $iMode = Opt("MouseCoordMode", 1) If Not $bMove Then Local $aPos = MouseGetPos() _WinAPI_ShowCursor(False) MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed) MouseMove($aPos[0], $aPos[1], 0) _WinAPI_ShowCursor(True) Else MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed) EndIf Opt("MouseCoordMode", $iMode) Return 1 EndFunc ;==>_GUICtrlTreeView_ClickItem64 Func _GUICtrlTreeView_DisplayRectEx64($hwnd, $hItem, $bTextOnly = False) ;~ https://www.autoitscript.com/forum/topic/198379-_guictrltreeview_clickitem-issues/?do=findComment&comment=1480466 Local $tRECT = DllStructCreate($tagRECT) Local $iRet If IsHWnd($hwnd) Then ; RECT is expected to point to the item in its first member. ;DllStructSetData($tRECT, "Left", $hItem) $iRet = @AutoItX64 ? DllStructSetData(DllStructCreate("ptr", DllStructGetPtr($tRECT)), 1, $hItem) _ : DllStructSetData($tRECT, "Left", $hItem) If _WinAPI_InProcess($hwnd, $__g_hTVLastWnd) Then $iRet = _SendMessage($hwnd, $TVM_GETITEMRECT, $bTextOnly, $tRECT, 0, "wparam", "struct*") Else Local $iRect = DllStructGetSize($tRECT) Local $tMemMap Local $pMemory = _MemInit($hwnd, $iRect, $tMemMap) _MemWrite($tMemMap, $tRECT) $iRet = _SendMessage($hwnd, $TVM_GETITEMRECT, $bTextOnly, $pMemory, 0, "wparam", "ptr") _MemRead($tMemMap, $pMemory, $tRECT, $iRect) _MemFree($tMemMap) EndIf Else If Not IsHWnd($hItem) Then $hItem = _GUICtrlTreeView_GetItemHandle($hwnd, $hItem) ; RECT is expected to point to the item in its first member. DllStructSetData($tRECT, "Left", $hItem) $iRet = GUICtrlSendMsg($hwnd, $TVM_GETITEMRECT, $bTextOnly, DllStructGetPtr($tRECT)) EndIf ; On failure ensure Left is set to 0 and not the item handle. If Not $iRet Then DllStructSetData($tRECT, "Left", 0) Return SetError($iRet = 0, $iRet, $tRECT) EndFunc ;==>_GUICtrlTreeView_DisplayRectEx64 I just added links to this post and this few lines: If @OSArch <> "X64" Then Local $iResult_temp = _GUICtrlTreeView_ClickItem($hwnd, $hItem, $sButton, $bMove, $iClicks, $iSpeed) Return SetError(@error, @extended, $iResult_temp) EndIf
    1 point
  5. The issue has already been addressed here.
    1 point
  6. @kurtykurtyboy I hope it's not too late to add to this thread, but I've encountered a problem using flat buttons that I just can't get a handle on. Under some circumstances, the flat buttons disappear from the GUI I'm using them on. (Minimizing and restoring the GUI doesn't being them back.) It's so rare that I haven't been able to isolate a cause. (I suspect it might be related to my use of SplashTextOn windows as overlays.) And the flat buttons work fine, up until they go away. Once they're gone, they're completely gone ... hovering ... tooltips ... everything. MSDN has a detailed description of window type here ... but it's hard to follow how all the variations might interact. So my questions are: 1) should my main GUI be created as a Layered window? and 2) are flat buttons considered Child windows? Those answers will help me decipher what might be happening. Thanks in advance for help.
    1 point
  7. jchd

    Print Vertical Ellipsis

    Set SciTE console to UTF8 then: U_ConsoleWrite(ChrW("0x22EE") & @LF) ; same as U_ConsoleWrite("⋮" & @LF) ; Unicode-aware ConsoleWrite Func U_ConsoleWrite($s) ConsoleWrite(BinaryToString(StringToBinary($s & @LF, 4), 1)) EndFunc ;==>U_ConsoleWrite
    1 point
  8. Nine

    Print Vertical Ellipsis

    ConsoleWrite is not the best tool to show unicode characters, try with MsgBox or a GUI label.
    1 point
  9. FordFinest, We have some issues with a few of the commands in the GuiTreeView UDF under Windows 10 64 bit. I had temporarily forgotten that in your previous post about the same subject a month ago. Sorry. The problem is obvious if you try the example of _GUICtrlTreeView_ClickItem in the help file under Windows 10 64 bit. The _GUICtrlTreeView_ClickItem command (here a double click) simply does not work. Make a copy of the example. Add the two functions here to the code and replace _GUICtrlTreeView_ClickItem with _GUICtrlTreeView_ClickItem64. Func _GUICtrlTreeView_ClickItem64($hWnd, $hItem, $sButton = "left", $bMove = False, $iClicks = 1, $iSpeed = 0) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) Local $tRECT = _GUICtrlTreeView_DisplayRectEx64($hWnd, $hItem, True) If @error Then Return SetError(@error, @error, 0) ; Always click on the left-most portion of the control, not the center. A ; very wide control may be off-screen which means clicking on it's center ; will click outside the window. Local $tPoint = _WinAPI_PointFromRect($tRECT, False) _WinAPI_ClientToScreen($hWnd, $tPoint) Local $iX, $iY _WinAPI_GetXYFromPoint($tPoint, $iX, $iY) Local $iMode = Opt("MouseCoordMode", 1) If Not $bMove Then Local $aPos = MouseGetPos() _WinAPI_ShowCursor(False) MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed) MouseMove($aPos[0], $aPos[1], 0) _WinAPI_ShowCursor(True) Else MouseClick($sButton, $iX, $iY, $iClicks, $iSpeed) EndIf Opt("MouseCoordMode", $iMode) Return 1 EndFunc ;==>_GUICtrlTreeView_ClickItem Func _GUICtrlTreeView_DisplayRectEx64($hWnd, $hItem, $bTextOnly = False) Local $tRECT = DllStructCreate($tagRECT) Local $iRet If IsHWnd($hWnd) Then ; RECT is expected to point to the item in its first member. ;DllStructSetData($tRECT, "Left", $hItem) $iRet = @AutoItX64 ? DllStructSetData( DllStructCreate( "ptr", DllStructGetPtr( $tRect ) ), 1, $hItem ) _ : DllStructSetData( $tRect, "Left", $hItem ) If _WinAPI_InProcess($hWnd, $__g_hTVLastWnd) Then $iRet = _SendMessage($hWnd, $TVM_GETITEMRECT, $bTextOnly, $tRECT, 0, "wparam", "struct*") Else Local $iRect = DllStructGetSize($tRECT) Local $tMemMap Local $pMemory = _MemInit($hWnd, $iRect, $tMemMap) _MemWrite($tMemMap, $tRECT) $iRet = _SendMessage($hWnd, $TVM_GETITEMRECT, $bTextOnly, $pMemory, 0, "wparam", "ptr") _MemRead($tMemMap, $pMemory, $tRECT, $iRect) _MemFree($tMemMap) EndIf Else If Not IsHWnd($hItem) Then $hItem = _GUICtrlTreeView_GetItemHandle($hWnd, $hItem) ; RECT is expected to point to the item in its first member. DllStructSetData($tRECT, "Left", $hItem) $iRet = GUICtrlSendMsg($hWnd, $TVM_GETITEMRECT, $bTextOnly, DllStructGetPtr($tRECT)) EndIf ; On failure ensure Left is set to 0 and not the item handle. If Not $iRet Then DllStructSetData($tRECT, "Left", 0) Return SetError($iRet = 0, $iRet, $tRECT) EndFunc ;==>_GUICtrlTreeView_DisplayRectEx You haven't shown much code, but I think the two functions will solve your problem. If the code doesn't help then add a new post. The problem can certainly be solved. For one reason or another, Microsoft has stopped supporting the focused state of a treeview item. However, the dotted focus rectangle is still displayed. This is not an AutoIt problem.
    1 point
×
×
  • Create New...