Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/27/2021 in all areas

  1. What you can do is to: Copy the content of the edit field into a variable. e.g. $copy=GuiCtrlRead($edit1) Add $cmdlineraw to the variable. $copy=$copy & $cmdlineraw (eventually add "& @crlf" here as well, if needed) Clear the editor text, then add the $copy to the edit field. then repeat as much as you like Edit: Try this 1st: You mentioned a truncated text. This can be due to the byte limit of the editor field. You can increase it with : _GUICtrlEdit_SetLimitText($Edit1, 20000000)
    2 points
  2. Nine

    Pixel Counter

    The UDF always starts at 0,0 from the top left, you can reduce the read to a lower right bottom but it will save only micro secs. Better read the whole screen. Then you can search for specific area.
    1 point
  3. 1 point
  4. The current Production version. I will not try to maintain compatibility going forward! Jos
    1 point
  5. just for fun, slightly modified and dressed as functions there are 2 paired functions: _GUICtrlCreateProgressCustom() allows you to create a customized Progressbar with the percentage superimposed. You can choose the colors of the background and of the progress bar. You can also optionally choose at what percentage of progress the color of the progress bar can change to another color. _GUICtrlSetDataProgressCustom() used to set the value of the custom progress bar hope you have fun #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ; ----- #include <WinAPITheme.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Progress", 367, 148, 192, 124) ; ----- ; create some example pregress bars Global $ahProgress[6] ; to store bars references $ahProgress[0] = _GUICtrlCreateProgressCustom(20, 10, 255, 25) ; plain progress bar $ahProgress[1] = _GUICtrlCreateProgressCustom(20, 40, 255, 25, -1, 0xFFFFFF, 0x00ff00, 70, 0xff00ff) ; change color when >= 70% $ahProgress[2] = _GUICtrlCreateProgressCustom(20, 70, 255, 25, 0x04, 0xFFFFFF, 0x00ff00, 100, 0xff0000) ; vertical filling effect + red at 100% $ahProgress[3] = _GUICtrlCreateProgressCustom(20, 100, 255, 25, -1, 0xFFFFFF, 0x5555aa, 90, 0xaaaaff) ; change color when >= 90% $ahProgress[4] = _GUICtrlCreateProgressCustom(290, 10, 25, 115, 0x04, 0x7f7f7f, 0x00ffff, 80, 0xaaaa00) ; vertical ; darker background ; some ugly colors $ahProgress[5] = _GUICtrlCreateProgressCustom(330, 10, 25, 115, 0x04, 0x7f7f7f, 0xff0000, 100, 0x00ff00) ; vertical ; darker background ; some ugly colors ; ----- GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ; update the progess bars For $i = 0 To 100 For $ii = 0 To UBound($ahProgress) - 1 _GUICtrlSetDataProgressCustom($ahProgress[$ii], $i) Next Sleep(100) Next While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlCreateProgressCustom ; Description ...: ; Syntax ........: _GUICtrlCreateProgressCustom($Left, $Top, $Width, $Height[, $Style = -1[, $BackColor = 0xFFFFFF[, ; $ForeColor = 0x00FF00[, $Warn = 0[, $WarnColor = 0xFF0000]]]]]) ; Parameters ....: $Left - The left side of the control. ; $Top - The top of the control. ; $Width - The width of the control. ; $Height - The height of the control. ; $Style - [optional] Defines the style of the control. Default is -1. ; the style con be useful to set a vertical Progress (use $PBS_VERTICAL 0x04) ; $BackColor - [optional] The background RGB color to use. Default is 0xFFFFFF. ; $ForeColor - [optional] The Progress bar RGB color to use. Default is 0x00FF00. ; $Warn - [optional] A value (inclusive) beyond which the bar color changes to the warning color. ; Default is 0 (disabled). (ie: use 101 to signal if a value > 100 has been set) ; $WarnColor - [optional] The Progress bar RGB color to use while in warn values. Default is 0xFF0000. ; Return values .: Returns an 1D 5 elements array as follow: ; [0] the identifier (controlID) of the new control. ; [1] the identifier (controlID) of the overlapped label control. ; [2] the Progress bar RGB color assigned to this bar. ; [3] the "warn" value at which and beyond which the bar color changes to the warning color. ; [4] The Progress bar RGB color to use while in warn values. ; Author ........: Chimp ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GUICtrlCreateProgressCustom($Left, $Top, $Width, $Height, $Style = -1, $BackColor = 0xFFFFFF, $ForeColor = 0x00FF00, $Warn = 0, $WarnColor = 0xFF0000) Local $aProgrStruct[5], $LabelWidth = 30, $LabelHeight = 25 $aProgrStruct[0] = GUICtrlCreateProgress($Left, $Top, $Width, $Height, $Style) _WinAPI_SetWindowTheme(GUICtrlGetHandle(-1), "", "") GUICtrlSetBkColor(-1, $BackColor) GUICtrlSetColor(-1, $ForeColor) ; color of the advancing bar $aProgrStruct[1] = GUICtrlCreateLabel("0%", _ $Left + ($Width / 2) - ($LabelWidth / 2), _ $Top + ($Height / 2) - ($LabelHeight / 2), _ $LabelWidth, $LabelHeight, $SS_CENTER + $SS_CENTERIMAGE) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ; optional $aProgrStruct[2] = $ForeColor $aProgrStruct[3] = $Warn $aProgrStruct[4] = $WarnColor Return $aProgrStruct EndFunc ;==>_GUICtrlCreateProgressCustom ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GUICtrlSetDataProgressCustom ; Description ...: ; Syntax ........: _GUICtrlSetDataProgressCustom($aProgress, $iValue) ; Parameters ....: $aProgress - the array returned by the _GUICtrlCreateProgressCustom() function. ; $iValue - an integer value to set the progress bar to. ; Return values .: None ; Author ........: Chimp ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _GUICtrlSetDataProgressCustom($aProgress, $iValue) Local $iFC = $aProgress[2] If $aProgress[3] And $iValue >= $aProgress[3] Then $iFC = $aProgress[4] GUICtrlSetColor($aProgress[0], $iFC) GUICtrlSetData($aProgress[0], $iValue) ;~ GUICtrlSetData($aProgress[1], $iValue & '%') GUICtrlSetData($aProgress[1], GUICtrlRead($aProgress[0]) & '%') EndFunc ;==>_GUICtrlSetDataProgressCustom
    1 point
×
×
  • Create New...