title: autoit and koda: how does gui create knows which koda form to use?
body: <p>I'm new to autoit, I wanted to create 2 forms and open the second one by clicking on a button of the first one.</p>
  
  <p>Here are my forms in koda:</p>
  
  <p><a href="https://i.stack.imgur.com/Yw1Sg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yw1Sg.png" alt="koda1"></a></p>
  
  <p><a href="https://i.stack.imgur.com/WeOHW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WeOHW.png" alt="koda2"></a></p>
  
  <pre><code>#include &lt;ButtonConstants.au3&gt;
  #include &lt;GUIConstantsEx.au3&gt;
  #include &lt;StaticConstants.au3&gt;
  #include &lt;WindowsConstants.au3&gt;
  #Region ### START Koda GUI section ### Form=
  $Act = GUICreate("Activités et Compétences", 615, 441, 196, 125)
  $RetourAccueil=1
  $ETAPE = 1
  
  $Label1 = GUICtrlCreateLabel(" Activités &amp;&amp; Compétences", 41, 12, 558, 85)
  GUICtrlSetFont(-1, 36, 800, 0, "My Lucky Penny")
  $PPE = GUICtrlCreateButton("PPE", 48, 168, 75, 25)
  $TP = GUICtrlCreateButton("TP", 152, 168, 75, 25)
  $TD = GUICtrlCreateButton("TD", 256, 168, 75, 25)
  $STAGE1 = GUICtrlCreateButton("STAGE 1", 368, 168, 75, 25)
  $STAGE2 = GUICtrlCreateButton("STAGE 2", 480, 168, 75, 25)
  $Group1 = GUICtrlCreateGroup("Activités", 24, 136, 561, 81)
  GUICtrlCreateGroup("", -99, -99, 1, 1)
  GUISetState(@SW_SHOW)
  
  
  #EndRegion ### END Koda GUI section ###
  Func RetourAccueil()
  
  EndFunc
  While 1
      $nMsg = GUIGetMsg()
      Switch $nMsg
          Case $GUI_EVENT_CLOSE
              Exit
  
          Case $PPE
              if $ETAPE=1 THEN
                 GUICtrlSetData(-1, "|PPE2.1-Mission ADISPO|PPE -Installation PFSENSE|PPE-Cas Kaspersky|Autres")
              EndIf
           Case $TP
                 $TP = GUICtrlCreateButton("NewName", 480, 168, 75, 25)
           Case $TD
                   $TD = GUICreate("Activités et Compétences", 615, 441, 196, 125)
                 WinActivate($TDPAGE)
           Case $STAGE1
                 MsgBox(64,'information','ok')
           Case $STAGE2
  
      EndSwitch
  WEnd
  </code></pre>
  
  <p>And here is the result whn I run it:</p>
  
  <p><a href="https://i.stack.imgur.com/Y1zvi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y1zvi.png" alt="enter image description here"></a></p>
  
  <p>By clicking on the button TD, I want to open the second form and close the first one but I have o idea how I tried with:</p>
  
  <pre><code>   Case $TD
              $TD = GUICreate("Activités et Compétences", 615, 441, 196, 125)
             WinActivate($TDPAGE)
  </code></pre>
  
  <p>But it didn't work...</p>