Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/12/2020 in all areas

  1. Danp2

    Invalid argument

    I think you mistyped "speeling". 🤪
    2 points
  2. @MachoCamicho Look at the coding for the DemoNavigation function and you'll see that it is designed to do exactly what you described (sans the bluetooth error; I think that's just a chromedriver "thing")
    1 point
  3. I think you have to modify the CheckboxCombo_ComboHandler() function located in the CheckboxCombo.au3 file like this: 1) add a variable ($iTotChecked) in line 315: Local $sText = "", $j = 0, $iTotChecked = 0 2) change line 323 from this If $sText Then $sText = StringLeft( $sText, StringLen( $sText ) - 2 ) to this If $sText Then $sText = StringReplace(StringTrimRight($sText, 2), ',', ',') $iTotChecked = @extended + 1 EndIf 3) change line 325 from this DllCall( "user32.dll", "int", "DrawTextW", "handle", $hDC, "wstr", $sText, "int", -1, "struct*", DllStructGetPtr( $tDIS, 8 ), "uint", $DT_SINGLELINE+$DT_VCENTER+$DT_END_ELLIPSIS ) ; _WinAPI_DrawText to this DllCall( "user32.dll", "int", "DrawTextW", "handle", $hDC, "wstr", String($iTotChecked), "int", -1, "struct*", DllStructGetPtr( $tDIS, 8 ), "uint", $DT_SINGLELINE+$DT_VCENTER+$DT_END_ELLIPSIS ) ; _WinAPI_DrawText
    1 point
  4. MathInDOS

    compile msstyles

    Is there any way to use .msstyle skins in autoit gui? 🤔
    1 point
  5. and i thought spelling was one of my strong points!
    1 point
  6. jguinch

    Real-Time log file viewer

    @Chimp Thanks for your keedback, you're right. The only way will be to reload the end of the file each time the file changes. I want to avoid it. I tried with CMTrace (tool from Configuration Manager tools) to see its behaviour , and it's the same result. So, for the moment, the tool stay as it, since a log file is usually not used as you describe. Maybe an option will be added for the refresh behaviour...
    1 point
  7. Checkbox Combo A Checkbox Combo control for multiple selections must be owner drawn to display Checkboxes. And the ListBox must remain open after an item is in/un-checked. Owner drawn Combo An owner drawn Combo control is discussed in first post. But there was one thing I forgot. For both WM_DRAWITEM and WM_MEASUREITEM messages, controlId is contained in wParam. In case of multiple Combo controls, the correct Combo can be determined by comparing controlId with wParam. Of course, it's much faster than first to create $tDIS and $tMIS structures from lParam, then extract CtlID from the structures, and finally compare controlId and CtlID. UDF and zip-file in first post updated. ListBox control An owner drawn Combo control can be implemented by subclassing the parent window. To keep the ListBox open, it's necessary to subclass the ListBox itself, and respond to WM_LBUTTONUP messages this way: Case $WM_LBUTTONUP Return 0 ; Prevents ListBox from closing This looks relatively easy in first place, but it has significant impact on the functionality of the entire Combo control. A number of smaller pieces of code must be added to make the control work normally again. Among other things AutoIt events are no longer generated for the corresponding controlID. This can be corrected by generating events for a Dummy control instead of: Case $WM_COMMAND Switch BitShift( $wParam, 16 ) ; _WinAPI_HiWord Case $CBN_CLOSEUP ; $idComboBox (Dummy control) event is generated when ListBox is closed GUICtrlSendToDummy( $aCheckboxCombo_Info[$iIdx][5] ) ; Dummy control EndSwitch Functions CheckboxCombo_Create() creates the Combo control but returns a Dummy control as mentioned above. CheckboxCombo_GetChecked() takes controlID (Dummy control) as input and returns checked items. CheckboxCombo_Delete() takes controlID (Dummy control) as input and deletes control. Example CheckboxCombo, 2D array.au3: ;#include <Array.au3> #include <GUIConstantsEx.au3> #include "..\Includes\CheckboxCombo.au3" Example() Func Example() ; Create GUI GUICreate( "Checkbox Combo", 220, 244 ) ; Combo items Local $aItems = [ [ "Item0" ], _ [ "Item1" ], _ [ "Item2", 1 ], _ ; Item2 is checked [ "Item3" ], _ [ "Item4", 1 ], _ ; Item4 is checked [ "Item5" ], _ [ "Item6", 1 ], _ ; Item6 is checked [ "Item7" ], _ [ "Item8" ], _ [ "Item9" ] ] ; Create Checkbox Combo Local $idComboBox = CheckboxCombo_Create( 10, 10, 200, 20, 10, $aItems ) ; Show GUI GUISetState() ; Message loop While 1 Switch GUIGetMsg() Case $idComboBox ConsoleWrite( "Checked items: " & CheckboxCombo_GetChecked( $idComboBox ) & @CRLF ) ;Local $aChecked = CheckboxCombo_GetChecked( $idComboBox, 1 ) ;_ArrayDisplay( $aChecked ) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; Cleanup GUIDelete() EndFunc Zip-file You need AutoIt 3.3.12 or later. Tested on Windows 7 and Windows 10. Comments are welcome. Let me know if there are any issues. CheckboxCombo.7z
    1 point
×
×
  • Create New...