Jump to content

GUICtrlDelete(), bug?


Recommended Posts

Okay I seem to have ran into a bug, but I want to check with you guys before making a fool out of myself in AutoIt Trac.

This gives me a hard crash:

GUICreate("",500,600)

$l5 = GUICtrlCreateLabel("Install folder", 10, 10, 300)
GUICtrlSetFont(-1, 16, 600)
$l4 = GUICtrlCreateLabel("1", 10, 50)
$input = GUICtrlCreateInput("8", 10, 100 + 30, 200, 20)
$browse = GUICtrlCreateButton("8", 220, 98 + 30, 65, 25)
$l1 = GUICtrlCreateLabel("8", 10, 170, 200)
$l2 = GUICtrlCreateLabel("8", 10, 190, 200)
$l3 = GUICtrlCreateLabel("8", 10, 210, 200)
$cancel = GUICtrlCreateButton("8", 355, 288, 75, 25)
$next = GUICtrlCreateButton("2", 260, 288, 75, 25)
$pic2 = GUICtrlCreatePic("", 0, 280, 450, 1)

GUISetState()
Do
    $msg = GUIGetMsg()
Until $msg = -3

GUISetState(@SW_HIDE)
GUICtrlDelete($input)
GUICtrlDelete($browse)
GUICtrlDelete($l1)
GUICtrlDelete($l3)
GUICtrlDelete($l2)
GUICtrlDelete($l4)
GUICtrlDelete($l5)
GUICtrlDelete($cancel)
GUICtrlDelete($next)
GUICtrlDelete($pic2)
GUISetState(@SW_SHOW)
Sleep(1000)

But if you comment GUICtrlDelete($input) or GUICtrlDelete($browse) the crash does not appear, mighty strange if you ask me.

Sorry for the long example but I couldn't reproduce otherwise (It's part of a bigger project)

The whole thing could just be a stupid misstake by me though :)

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Hmm this doesn't crash for me... running totally as is from your post, everything works fine (for me). Maybe a dumb question but what exactly do you mean by hard crash?

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

Hmm this doesn't crash for me... running totally as is from your post, everything works fine (for me). Maybe a dumb question but what exactly do you mean by hard crash?

This is what I mean:

Posted Image

It's translates to: AutoIt v3 Script has stopped working.

You can search online for a solution.

Search online and close application

Close application.

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Managed to get it down to do this:

GUICreate("",500,600)
$input = GUICtrlCreateInput("8", 10, 100 + 30, 200, 20)
$pic2 = GUICtrlCreatePic("", 0, 280, 450, 1)
GUISetState()

Do
    $msg = GUIGetMsg()
Until $msg = -3

GUISetState(@SW_HIDE)
GUICtrlDelete($input)
GUICtrlDelete($pic2)
GUISetState(@SW_SHOW)
Sleep(1000)

Reporting the bug to AutoIt Trac now :)

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...