Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/18/2023 in all areas

  1. Case $ComboSelectIniFile $Ini_FileNameReadCombo = $aDirPro & '\' & GUICtrlRead($ComboSelectIniFile) & '.ini' If GUICtrlRead($ComboSelectIniFile) <> 'SelectIniFile' Or GUICtrlRead($ComboSelectIniFile) > 0 Then GUICtrlSetData($ComboLoadPattern, "") GUICtrlSetData($ComboLoadPattern, IniRead($Ini_FileNameReadCombo, $SectionName, 'REGEXPATTERN', '')) ; ???? EndIf Case $ButtonSaveIni $Ini_FileNameReadCombo = $aDirPro & '\' & GUICtrlRead($ComboSelectIniFile) & '.ini' If Not GUICtrlRead($ComboLoadPattern) = "" Then IniWrite($Ini_FileNameReadCombo, $SectionName, 'REGEXPATTERN', GUICtrlRead($ComboLoadPattern)) MsgBox(0, "Saved Ok.", "Regex pattern Saved Ok.", 3) GUICtrlSetData($ComboLoadPattern, "") GUICtrlSetData($ComboLoadPattern, IniRead($Ini_FileNameReadCombo, $SectionName, 'REGEXPATTERN', '')) ; ???? How do you expect to work if you don't use the function that change default separator? SetCombo($ComboLoadPattern, IniRead($Ini_FileNameReadCombo, $SectionName, 'REGEXPATTERN', ''), Chr(5))
    1 point
  2. 1 point
  3. It was just an example. You can pick whatever you want as separator. $hMain = GUICreate("Example", 400, 200) $cCombo = GUICtrlCreateCombo('', 10, 10, 380, 20) SetCombo($cCombo, '(.com|\.net|\.org|\.info|\.biz|\.eu|\.fr|\.ch|\.kr|\.edu|\.us)(.*)', Chr(5)) GUICtrlSetData($cCombo, 'Item 1|Item 2') GUISetState(@SW_SHOW, $hMain) Do Sleep(10) Until GUIGetMsg() = -3 Func SetCombo($cCombo, $sData, $sSeparator) Local $sPrevSeparator = AutoItSetOption('GUIDataSeparatorChar', $sSeparator) GUICtrlSetData($cCombo, $sData) AutoItSetOption('GUIDataSeparatorChar', $sPrevSeparator) EndFunc
    1 point
  4. You can change the default separator with AutoItSetOption('GUIDataSeparatorChar', '<separator>') Here is a full example: AutoItSetOption('GUIDataSeparatorChar', '^') $hMain = GUICreate("Example", 400, 200) $cCombo = GUICtrlCreateCombo('', 10, 10, 380, 20) GUICtrlSetData($cCombo, '(.com|\.net|\.org|\.info|\.biz|\.eu|\.fr|\.ch|\.kr|\.edu|\.us)(.*)') GUISetState(@SW_SHOW, $hMain) Do Sleep(10) Until GUIGetMsg() = -3 You can even have a specialized function to set data in combo with a certain separator and then restore the default separator: $hMain = GUICreate("Example", 400, 200) $cCombo = GUICtrlCreateCombo('', 10, 10, 380, 20) SetCombo($cCombo, '(.com|\.net|\.org|\.info|\.biz|\.eu|\.fr|\.ch|\.kr|\.edu|\.us)(.*)', '^') GUICtrlSetData($cCombo, 'Item 1|Item 2') GUISetState(@SW_SHOW, $hMain) Do Sleep(10) Until GUIGetMsg() = -3 Func SetCombo($cCombo, $sData, $sSeparator) Local $sPrevSeparator = AutoItSetOption('GUIDataSeparatorChar', $sSeparator) GUICtrlSetData($cCombo, $sData) AutoItSetOption('GUIDataSeparatorChar', $sPrevSeparator) EndFunc
    1 point
  5. @cag8f when you start shareX, by default the active tool is 'select and move' which does not have the option 'Tool Options' for this reason when I start the example I start it with r 'Rectangle' to make sure it has the option 'Tool Options' (or whatever tool you want, which has the option 'Tool Options') e.g. when i choose 'Rectangle' the screen position of 'Tool Options' is circa 1322, 37 when i choose 'Text (Background)' the screen position of 'Tool Options' is circa 1322, 37 when i choose 'Text (Outline)' the screen position of 'Tool Options' is circa 1296, 37 when i choose 'Line' the screen position of 'Tool Options' is circa 1296, 37 Local $hWnd = WinWait("ShareX - Editor menu", "", 3) ConsoleWrite("$hWnd: " & $hWnd & @CRLF) ;~ ;first click Tool Rectangle ControlClick($hWnd, "", "WindowsForms10.Window.8.app.0.1a52015_r6_ad11", "left", 1, 220, 16) ;Then click Tool Options ControlClick($hWnd, "", "WindowsForms10.Window.8.app.0.1a52015_r6_ad11", "left", 1, 869, 16) Sleep (200) ;get value from 'BorderSize' $Result = Int(ControlGetText("[CLASS:WindowsForms10.Window.808.app.0.1a52015_r6_ad1]", "", "WindowsForms10.EDIT.app.0.1a52015_r6_ad11")) ;here we have some difference 'CLASS:WindowsForms10.Window.20808.app.' VS 'CLASS:WindowsForms10.Window.808.app.' *** <-- ;~ $Result = ControlGetText('[CLASS:WindowsForms10.Window.20808.app.0.1a52015_r6_ad1]', '', '[CLASS:WindowsForms10.EDIT.app.0.1a52015_r6_ad11; INSTANCE:1]') ;Then send esc to 'ShareX - Editor menu' to close the 'Tool Options' WinActivate($hWnd) Send("{ESC}") ;print result ConsoleWrite("$Result = " & $Result & @CRLF) ℹ️ because I have ShareX version 15, and among the screenshots you sent us, the only difference I noticed is that for you it is _r6_ and for me it is _r22_ for the 'Window.20808.app' in line 16 I didn't see any data and I don't know but the pattern doesn't match so check it
    1 point
  6. Just look in help file at _WinAPI_SetWindowsHookEx() example. It's basically all you need.
    1 point
  7. smbape

    OpenCV v4 UDF

    Update opencv to 4.7.0 COM Registration is no longer required
    1 point
×
×
  • Create New...