Sign in to follow this  
Followers 0
gottygolly

My GUIs are being weird (Or normal)

3 posts in this topic

When I click "Add" it calls the functions "add()" in that function is another gui, im just messing around trying to understand the guisetdata more and just getting used to typing all the gui functions out. However, when i click "ok" in the "add()" function gui it deletes it and displays the main gui but the window is diables and nothing is working to fix it (I've tried macros maybe there is something else i dont know about) My code is below, thanks in advance.

$g1 = GUICreate("Home",500,300)

$b1 = GUICtrlCreateButton("Add",0,0,100,30)
$list = GUICtrlCreateList("",100,0,300,200)

GUISetState()

while 1
   $msg = GUIGetMsg()
   Select
   case $msg = -3
      Exit
   case $msg = $b1
      call(add())
   EndSelect
   WEnd

   func add()
      
      GUICreate("Add",300,100)
      
      $input = GUICtrlCreateInput("",0,0,295,30)
      $ok = GUICtrlCreateButton("Ok",0,70,100,30)
      $rad = GUICtrlCreateRadio("Red",0,30,100,30)
      
      GUISetState()
      
      while 1
         $msg = GUIGetMsg()
         Select
         case $msg = -3
            Exit
         case $msg = $ok
            $red = GUICtrlRead($input)
            GUICtrlSetData($list,$red)
            GUIDelete()
         EndSelect
         WEnd
        EndFunc

Share this post


Link to post
Share on other sites



The wiki has a wonderful tutorial about how to work with multiple GUIs.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thank you for the quick reply, i will look over the wiki and see if it helps me.

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  
Followers 0