Jump to content

Recommended Posts

Posted

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
Posted

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
×
×
  • Create New...