Change window while active

2 posts in this topic

Hello everyone,

I am making a litle programm that helps my classmates how to fix their internet problems.
I just started with is so there isn't very much in the window yet..

But what i want to ask you guy's: is there a way that the window changes while it is active. Like first you see picture 1 and some text, and when you press the start button the hole window changes so that the picture and text are gone and you see something els. And that when you restart it, it is resetted. I tried it whit just opening a new window but that became somewhat odd. Can you guys help me? (And i don't mean by making litle tabs.)


In other words: when you press the start button, the picture and start button disapears, and in stead of that other buttons and text and pictures appear.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#Region ### START Koda GUI section ### Form=c:\backup\bots\bronnen\koda\wifi-s.kxf
$Form1 = GUICreate("WIFI-S ©", 762, 467, -1, -1)
$Start = GUICtrlCreateButton("Start", 568, 368, 131, 57)
GUICtrlSetFont(-1, 11, 400, 0, "Segoe UI")
$Logo = GUICtrlCreatePic("C:\Backup\Bots\WIFI-S\Sources\Home\Logo Wifi-S.jpg", 8, 8, 132, 132)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
         Case $Start


Func Start()

Thank you very much if you have a answer because i searched a lot but i didn't find anything like this.

Share this post

Link to post
Share on other sites

Yes that is possible. Just open the helpfile and look for the appropriate GUICtrlxxxxx functions.

Ik weet zeker dat je het zelf kan vinden en zorg ervoor dat er niet nog een Topic gesloten wordt vanwege Bots, want dat zou nummer 3 zijn en dat blijft niet zonder consequenties!  De directory naam belooft niet veel goeds.  (Lets see what Google makes of this when translated to English) 


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

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

  • Similar Content

    • manit
      what happens if window not found
      By manit
      hi ,
      I have written a script to simulate keypresses and click on some windows 
      The work is repetitive.
      Here I activate 'foobar' and click on a place in it then press few down arrow keys . Then some keypresses in 'reboot' window ...
      (1)It sometimes happen that am external window pops up taking focus away from action being performed by script . As a result ,say, 'reboot' window does not appear . How should I bring scipt to run from beginning (of while loop) again ?
      (2)I used window info tool to find coordinates of place to click . Is it possible that window info tool keeps updating mouse coordinate even when I do not drag its finder ?
      (3)I would also like to add functionality to do an action on window 'new IP' , if found , in the infinite while loop .
      Please give directions.

      #include <AutoItConstants.au3> HotKeySet("{ESC}", "dummy") AutoItSetOption("WinTitleMatchMode",2); Local $hWnd, $x, $y, $pos, $reponse While 1 $hWnd = WinGetHandle("foobar") $pos = WinGetPos($hWnd) $x = 360 ;  $y = 77  ;  WinActivate($hWnd) MouseClick("left", $pos[0] + $x, $pos[1] + $y) Send("{DOWN}") WinWaitActive($hWnd) Send("{DOWN}") WinWaitActive($hWnd) Send("{DOWN}") WinWaitActive($hWnd) Send("{DOWN}") WinWaitActive($hWnd) Send("{DOWN}") Send("{DOWN}") WinWaitActive($hWnd) WinWaitActive($hWnd) Send("{ENTER}") $reboot_window = WinWait("Reboot") WinWaitActive($reboot_window) Send("{TAB}") WinWaitActive($reboot_window) Send("{SPACE}") WinWaitActive($reboot_window) Send("{TAB}") WinWaitActive($reboot_window) Send("{DOWN}") Send("{DOWN}") WinWaitActive($reboot_window) Send("{TAB}") WinWaitActive($reboot_window) Send("{DOWN}") WinWaitActive($reboot_window) Send("{TAB}") WinWaitActive($reboot_window) Send("{SPACE}") Sleep(1000) $response = WinGetHandle("Reboot") $pos = WinGetPos($response) $x = 168 ; 530-362 $y = 258  ; 376-118 WinActivate($response) MouseClick("left", $pos[0] + $x, $pos[1] + $y) Sleep(50000) WEnd Func dummy() EndFunc   ;==>dummy
    • rcmaehl
      WindowEx - Additional Window Statistics - Release: V0.4 - 10/04/2016
      By rcmaehl
      A UDF with Extended Functions for Window Management

      This UDF is still in Alpha phase. All code works and should be generally bug free, however function names and parameters are subject to change.
      Fixes _WindowGetClassList's barbaric returning of a @LF separated string instead of an array.
      Potential Uses:
      Automating applications that change their controls' handles/classes on each launch (e.g. half of Cisco's programs)
      Download:  (v0.4)
      10/04/2016 (v0.4): _WinGetClassNNList Fixed : Not Returning an Index when using $2D_ARRAY _WinGetClassNNList Fixed : Not Properly returning $aArray[x][1] on Classes with instances > 9 when using $2D_ARRAY 10/03/2016 (v0.3): _WinGetClassList Added : Exactly the same as WinGetClassList but returns a more civilized Array _WinGetClassNNList Added : Returns Classes and their instances in either a 1D or 2D array depending on Flags _WindowGetHandleList Renamed: _WinGetHandleList SCRIPT BREAKING! _WindowGetHandleListFromPos Renamed: _WinGetHandleListFromPos SCRIPT BREAKING! 10/01/2016 (v0.2): WindowsExConstants.au3 Added : Flags in _WindowGetHandleListFromPos _WindowGetHandleListFromPos Removed: ConsoleWrite left in during debug _WindowGetHandleListFromPos Added : Flag for if part of a Control is at $X, $Y return it as well. 10/01/2016 (v0.1): _WindowGetHandleList Added : Retrieves the handles of classes from a window. _WindowGetHandleListFromPos Added : Retrieves the handles of classes at a specific position from a window. Known and Reported Bugs:
      None reported To Do:
      To Be Decided. Opinions welcome! Upcoming Changes:
      To Be Decided.
    • cookiemonster
      Can't click button after show window
      By cookiemonster
      I have a window with two buttons, when i click the second button it shows a new window and hides the orgional window, when you click close on the second window, it hides the second window and shows the first one again, but now on the first one I can click the buttons but they no longer do anything, why is this?
    • RobOtter
      Resize handler for unresizable windows
      By RobOtter
      I want to write a tool to resize usually unresizable windows (like the file properties window of Windows Explorer for example).
      Although I have already managed to set the window border style to resizable, this of course doesn´t add the resizing feature itself. So, how do I hook on this to perform the resizing of window and controls myself? I think of some kind of event handler but have no idea how start. Can you help me with this?
    • Tirk
      How can I move a GUI wiindow
      By Tirk
      How can I move a GUI window? How can I adjust the gui's position (coordinates) ?
      ... When I click to the green four-way arrow and move the mouse --> move the gui window.