Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3225 closed Bug (No Bug)

Interrupt function not work when working with GUICtrlRichEdit

Reported by: michael.szerencsits@… 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)

test2.au3 (3.0 KB) - added by michael.szerencsits@… 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by michael.szerencsits@…

comment:1 Changed 9 years ago by mLipok

_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()

Sleep(100)
_GUICtrlRichEdit_AppendText($LogWindowR, $logtext)

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.

comment:2 Changed 9 years ago by Melba23

  • Resolution set to No Bug
  • Status changed from new to closed

comment:3 Changed 9 years ago by Melba23

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.