Jump to content
Sign in to follow this  
Greenhorn

[solved] click Button -> endless loop

Recommended Posts

Greenhorn

Hi all there,

I have a problem with creating a GUI in a $WS_POPUP style and I don't know what's up in this case ... ;)

If I push the Button to select a folder the Dialogwindow pops up again and again and again in an endless loop !

Why ?

What is wrong in my GUI creation ..., in other tests with standard GUIs it works fine ?!

The Forum search don't brought me up to see clear ... :P

Could anybody give me a little help, please ?!

#include <GUIConstants.au3>
      
      Opt('RunErrorsFatal', 0)
      
      Dim $sName, $sdestDir, $count
      
      $GUI = GUICreate(' Main GUI', 635, 476, 193, 125, $WS_POPUP)
      GUISetFont(8, 400, 0, 'Comic Sans MS')
      GUISetBkColor(0x000000)
      $Name = GUICtrlCreateInput('', 24, 320, 201, 21)
      $destDir = GUICtrlCreateInput('', 24, 368, 201, 21)
      $btnSelect = GUICtrlCreateButton('...', 230, 368, 25, 21)
      GUICtrlSetColor(-1,0xff0000)
      $inputcount = GUICtrlCreateInput('1', 24, 264, 45, 21, BitOR($ES_RIGHT,$ES_AUTOHSCROLL,$ES_NUMBER))
      $updown = GUICtrlCreateUpdown($inputcount)
      $labelcount = GUICtrlCreateLabel('count', 24, 248, 29, 17)
      $btnStart = GUICtrlCreateButton('Start', 528, 352, 73, 25, 0)
      GUICtrlSetColor(-1,0xff0000)
      GUICtrlSetState(-1, $GUI_DISABLE)
      $btnBeenden = GUICtrlCreateButton('Beenden', 528, 386, 73, 25, 0)
      GUICtrlSetColor(-1,0xff0000)
      GUICtrlSetTip(-1, 'Kopieren starten')
      $progress = GUICtrlCreateProgress(24, 32, 201, 17)
      GUICtrlSetColor(-1,0xff0000)
      GUICtrlSetState(-1, $GUI_HIDE)
      $labelprgs = GUICtrlCreateLabel('', 24, 64, 4, 4)
      GUICtrlSetColor(-1,0xff0000)
      GUICtrlSetState(-1, $GUI_HIDE)
      $labelfname = GUICtrlCreateLabel('Dateiname ...', 24, 296, 110, 17)
      GUICtrlSetColor(-1,0xff0000)
      $labeldest = GUICtrlCreateLabel('Zielverzeichnis ...', 24, 348, 78, 17)
      GUICtrlSetColor(-1,0xff0000)
      $Pic = GUICtrlCreatePic('backpic.bmp', 0, 0, 635, 476, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
      GUICtrlSetState(-1, $GUI_DISABLE)
      
      GUISetState(@SW_SHOW)
      
      
      While 1
          $nMsg = GUIGetMsg()
          Switch $nMsg
              Case $btnBeenden
                  Exit
              Case $btnStart
  ;check_input()
              Case $Name
                  $sName = GUICtrlRead($Name)
                  GUICtrlSetData($destDir, $Name)
                  If $sdestDir <> '' Then GUICtrlSetState($btnStart, $GUI_ENABLE)                        
              Case $destDir
                  $sdestDir = GUICtrlRead($destDir)
                  If $sName <> '' Then GUICtrlSetState($btnStart, $GUI_ENABLE)    
              Case $inputcount
                  $count = GUICtrlRead($inputcount)
              Case $btnSelect;          --- here the problem begins ... :( ---
                  $dlgDir = FileSelectFolder('Zielverzeichnis w√§hlen...', '::{20D04FE0-3AEA-1069-A2D8-08002B30309D}', 7)
                  GUICtrlSetData($destDir, $dlgDir)
          EndSwitch
      WEnd

It's my first trial with Backgroundpictures in a window ...

Greetz

Greenhorn

Edited by Greenhorn

Share this post


Link to post
Share on other sites
Nahuel

That's an AutoIt bug. It was fixed in the latest beta, download it and you'll see :P

Share this post


Link to post
Share on other sites
Greenhorn

Thanx a lot, Nahuel, I will try it out ... ;)

In the search here (or at the german board) I found a Topic with this diagnose, but I thought it depends on an earlier AutoIt version ...

O.K. ..., I tried it with 3.2.9.13 beta and it works ! The problem is solved ! :P

Greetz

Greenhorn

Edited by Greenhorn

Share this post


Link to post
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
Sign in to follow this  

×