title: AutoHotkey: Dynamic resize control based on text
body: <p>Consider the following snippet:</p>
  
  <pre><code>FormatTime, time,
  Gui, Add, Text, vcTime, 
  GuiControl, , cTime, % time 
  Gui, Show, NoActivate Center AutoSize
  </code></pre>
  
  <p><code>AutoSize</code> is based on the initial value from <code>Gui, Add, Text, vcTime</code> and not on the new value set by <code>GuiControl, , cTime, % time</code>. Depending on months etc., <code>%time%</code> length can vary. How can I automatically resize the window to adapt to updated values of <code>%time%</code>?
   `</p>