#3225 closed Bug (No Bug)
Interrupt function not work when working with GUICtrlRichEdit
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.14.2 | Severity: | None |
| Keywords: | RichEdit Interrupt | Cc: |
Description
Hello AutoIt Team,
I created a program where RichEdit Box where filled in a for..to loop. I tried to implement an interrupt function but it doesn't work. Than I changed the RichEdit Box to a normal Edit box and the interrupt function work.
I attached a sampe program where this can be reproduced. Select 'Edit' radiobox and click on start. The counter now starts from 1 to 1000 and you can interrupt it via stop button. When you now select 'RichEdit' and press start, you are not able to interrupt it.
Thanks and regards
Michael
Attachments (1)
Change History (4)
by , 10 years ago
comment:1 by , 10 years ago
comment:2 by , 10 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:3 by , 10 years ago
Or you can activate the main GUI each time you write to the RichEdit:
Func _myLogR($logtext, $color = "0x000000") $iEndPoint = _GUICtrlRichEdit_GetTextLength($LogWindowR, True, True) - _GUICtrlRichEdit_GetLineCount($LogWindowR) If $iEndPoint < 0 Then $iEndPoint = 0 _GUICtrlRichEdit_AppendText($LogWindowR, $logtext) WinActivate($Form1) EndFunc ;==>_myLogR
And, as mLipok mentioned, in future please us the forum for support questions.
M23

_GUICtrlRichEdit_AppendText
uses
_GUICtrlRichEdit_SetSel
which uses
_WinAPI_SetFocus
this _WinAPI_SetFocus setting focus on GUI and fires WM_COMMAND
_WinAPI_SetFocus is called many times in single seconds
so your CLICKING in
$iStop = GUICtrlCreateButton("Stop", 70, 10, 50, 20)
is to sloow for AutoIt speed.
You can make a work around by
adding Sleep()
or by
removing
_WinAPI_SetFocus
from
_GUICtrlRichEdit_SetSel
This is not support forum, next time please first ask on the forum:
https://www.autoitscript.com/forum/forum/2-autoit-general-help-and-support/
Sumarizing: It seams to be normal behavior in this case.