Modify

Opened 44 hours ago

Last modified 23 hours ago

#3745 assigned Bug

bug appears on windows 10, writing to edit control freezes script and crashes it.

Reported by: TheAutomator Owned by: Melba23
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: edit, gui, write, append, text Cc:

Description

referring tho this weird bug:

https://www.autoitscript.com/forum/topic/201263-async-soundplay-freezes-gui/?tab=comments#comment-1445495

my code:

#include <guiconstantsex.au3>
#include <buttonconstants.au3>
#include <windowsconstants.au3>
#include <guiedit.au3>

;--------------------------------------------------------------------------------------------------

const $form = guicreate('TypingError', 600, 400, default, default, bitor($gui_ss_default_gui,$ws_maximizebox,$ws_sizebox,$ws_thickframe,$ws_tabstop))
    guisetbkcolor(0x400000)
    const $console = guictrlcreateedit('loading...', 10, 10, 581, 341, bitor($es_autovscroll,$es_readonly,$es_wantreturn,$ws_vscroll), 0)
        guictrlsetfont(default, 12, 800, 0, 'consolas')
        guictrlsetcolor(default, 0xffffff)
        guictrlsetbkcolor(default, 0x000000)
        guictrlsetresizing(default, bitor($gui_dockleft,$gui_dockright,$gui_docktop,$gui_dockbottom))
        guictrlsetcursor (default, 3)
    const $user = guictrlcreateinput('', 10, 360, 521, 30, default, 0)
        guictrlsetfont(default, 14, 800, 0, 'consolas')
        guictrlsetcolor(default, 0xffffff)
        guictrlsetbkcolor(default, 0x000000)
        guictrlsetresizing(default, bitor($gui_dockleft,$gui_dockright,$gui_dockbottom,$gui_dockwidth,$gui_dockheight))
    const $send = guictrlcreatebutton('send', 540, 360, 51, 31, bitor($es_uppercase,$bs_defpushbutton,$ws_disabled))
        guictrlsetresizing(default, bitor($gui_dockright,$gui_dockbottom,$gui_dockwidth,$gui_dockheight))
        guictrlsetcursor (default, 0)
guisetstate(@sw_show)

;--------------------------------------------------------------------------------------------------

Global $clear = False
func WRITE($message)
    if $clear then
        $clear = False
    else
        _guictrledit_appendtext($console, @crlf)
    endif
    ADD($message)
endfunc

Func ADD($message)
    for $i = 1 to stringlen($message)
        sleep(50)
        _guictrledit_appendtext($console, stringmid($message, $i, 1))
    next
EndFunc

func READ()
    guictrlsetstate($send, $gui_enable)
    while 1
        switch guigetmsg()
            case $gui_event_close
                exit
            case $send
                guictrlsetstate($send, $gui_disable)
                local $answer = guictrlread($user)
                guictrlsetdata($user, '')
                return $answer
        endswitch
    wend
endfunc

HotKeySet('{esc}','quit')
func QUIT()
    write("goodbye...")
    exit
endfunc

;--------------------------------------------------------------------------------------------------

write('this a test of a string with the ' & @CRLF & 'character in it...')
read()
Sleep(1000)
$clear = True
GUICtrlSetData($console, '')
write('this a test of qdfgdqfgqdfga string with the ' & @CRLF & 'character in it...');PROBLEM!
read()
write('this a test oqdgff a string with the ' & @CRLF & 'character in it...')
read()
write('this a t... cbgfshf...e?' & @CRLF & 'character in it...')
read()
write('done')

Attachments (1)

919513622_Aantekening2020-01-16133439.jpg.7010e22040b54d9d8aca32b027ff6792.jpg (29.8 KB) - added by anonymous 44 hours ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 23 hours ago by Melba23

  • Owner set to Melba23
  • Status changed from new to assigned

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 assigned The owner will remain Melba23.
Author


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

 
Note: See TracTickets for help on using tickets.