Jump to content

Enable checkbox by clicking another checkbox


Recommended Posts

Hi,

i want to enable a checkbox if another checkbox is checked, by default it should be disabled.

Im trying do to this like this:

 

Local $idCheckboxGroup = GUICtrlCreateCheckbox ( "Do X", 80, 360  )
GUICtrlSetOnEvent($idCheckboxGroup, "Checkbox1Click")
Local $idCheckboxFixGroup = GUICtrlCreateCheckbox ("Do Y", 80, 380  )


Func Checkbox1Click()
    If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then
        GUICtrlSetState($idCheckboxFixGroup, $GUI_ENABLE)
    Else
        GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE)
    EndIf
EndFunc

But it doesnt work. Any ideas?

Link to comment
Share on other sites

hm by "default is the previously used window" , so normally it should work, but it doesnt. and i have no clue how to change it

and the autoIT process has 32% cpu usage

if i remove this

Opt("GUIOnEventMode", 1)

process has 0,1% and the X on the window works

Edited by apbonn
Link to comment
Share on other sites

this is the gui code (first code with autoIT, sorry  that it looks shitty i guess)

 

Opt("GUIOnEventMode", 1)
Opt("MustDeclareVars", 1)

Local $dropFile_1, $dropFile_2, $label, $msg, $dropFile_3, $dropFile_4, $dropFile_5, $dropFile_6, $dropFile_7, $dropFile_8, $dropFile_9, $dropFile_10

GUICreate('XML ressource checker', 530, 470, @DesktopWidth / 2 - 192, _
    @DesktopHeight / 2 - 235, -1, $WS_EX_ACCEPTFILES + $WS_EX_TOPMOST)

GUICtrlCreateGroup("XML Files", 5, 5, 510, 460)
GUICtrlCreateLabel('File 1:', 20, 30)
$dropFile_1 = GUICtrlCreateInput("", 80, 30, 400, 20, -1)
GUICtrlSetState($dropFile_1, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_1, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 2:', 20, 60)
$dropFile_2 = GUICtrlCreateInput("", 80, 60, 400, 20, -1)
GUICtrlSetState($dropFile_2, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_2, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 3:', 20, 90)
$dropFile_3 = GUICtrlCreateInput("", 80, 90, 400, 20, -1)
GUICtrlSetState($dropFile_3, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_3, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 4:', 20, 120)
$dropFile_4 = GUICtrlCreateInput("", 80, 120, 400, 20, -1)
GUICtrlSetState($dropFile_4, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_4, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 5:', 20, 150)
$dropFile_5 = GUICtrlCreateInput("", 80, 150, 400, 20, -1)
GUICtrlSetState($dropFile_5, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_5, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 6:', 20, 180)
$dropFile_6 = GUICtrlCreateInput("", 80, 180, 400, 20, -1)
GUICtrlSetState($dropFile_6, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_6, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 7:', 20, 210)
$dropFile_7 = GUICtrlCreateInput("", 80, 210, 400, 20, -1)
GUICtrlSetState($dropFile_7, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_7, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 8:', 20, 240)
$dropFile_8 = GUICtrlCreateInput("", 80, 240, 400, 20, -1)
GUICtrlSetState($dropFile_8, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_8, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 9:', 20, 270)
$dropFile_9 = GUICtrlCreateInput("", 80, 270, 400, 20, -1)
GUICtrlSetState($dropFile_9, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_9, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 10:', 20, 300)
$dropFile_10 = GUICtrlCreateInput("", 80, 300, 400, 20, -1)
GUICtrlSetState($dropFile_10, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_10, 'You can drag & drop files here...')

Local $idCheckboxUseless = GUICtrlCreateCheckbox ( "Suche fehlende Ressourcen", 80, 320  )
Local $idCheckbox = GUICtrlCreateCheckbox ( "Log mit Timestamp", 80, 400  )
Local $idCheckboxGroup = GUICtrlCreateCheckbox ( "Suche fehlende Ressourcen anhand der GroupID", 80, 360  )
GUICtrlSetOnEvent($idCheckboxGroup, "Checkbox1Click" )
Local $idCheckboxFixGroup = GUICtrlCreateCheckbox ("Adde gefundene Ressoucren mit identischer GroupID", 80, 380  )
Local $idCheckboxRef = GUICtrlCreateCheckbox ( "Lösche nicht gefundene Ressourcen ", 80, 340  )


Local $idStart = GUICtrlCreateButton("XMLs prüfen", 215, 420, 100, 25)
Local $sFile1, $sFile2,$sFile3, $sFile4,$sFile5, $sFile6,$sFile7, $sFile8,$sFile9, $sFile10
GUICtrlSetState($idCheckboxUseless, $GUI_DISABLE)
GUICtrlSetState($idCheckboxUseless, $GUI_CHECKED)
GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE)



Func Checkbox1Click()
    If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then
        GUICtrlSetState($idCheckboxFixGroup, $GUI_ENABLE)
    Else
        GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE)
    EndIf
EndFunc


GUISetState()
While 1
  $msg = GUIGetMsg()
  Switch $msg
    Case $GUI_EVENT_CLOSE
      GUIDelete()
      ExitLoop
    Case $GUI_EVENT_DROPPED
      If @GUI_DropId = $dropFile_1 Then
        GUICtrlSetData($dropFile_1, @GUI_DragFile)
      ElseIf @GUI_DropId = $dropFile_2 Then
        GUICtrlSetData($dropFile_2, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_3 Then
        GUICtrlSetData($dropFile_3, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_4 Then
        GUICtrlSetData($dropFile_4, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_5 Then
        GUICtrlSetData($dropFile_5, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_6 Then
        GUICtrlSetData($dropFile_6, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_7 Then
        GUICtrlSetData($dropFile_7, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_8 Then
        GUICtrlSetData($dropFile_8, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_9 Then
        GUICtrlSetData($dropFile_9, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_10 Then
        GUICtrlSetData($dropFile_10, @GUI_DragFile)
      EndIf
    Case $idStart
      $sFile1 = GUICtrlRead($dropFile_1)
      $sFile2 = GUICtrlRead($dropFile_2)
      $sFile3 = GUICtrlRead($dropFile_3)
      $sFile4 = GUICtrlRead($dropFile_4)
      $sFile5 = GUICtrlRead($dropFile_5)
      $sFile6 = GUICtrlRead($dropFile_6)
      $sFile7 = GUICtrlRead($dropFile_7)
      $sFile8 = GUICtrlRead($dropFile_8)
      $sFile9 = GUICtrlRead($dropFile_9)
      $sFile10 = GUICtrlRead($dropFile_10)
      
    
   
    If GUICtrlRead($idCheckbox) = $GUI_CHECKED Then
        local $withLog = 1
    Else
        local $withLog = 0
    EndIf
    If GUICtrlRead($idCheckboxRef) = $GUI_CHECKED Then
        local $withRef = 1
    Else
        local $withRef = 0
    EndIf
    If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then
        local $withGroup = 1
    Else
        local $withGroup = 0
    EndIf
    If GUICtrlRead($idCheckboxFixGroup) = $GUI_CHECKED Then
        local $withGroupCorrect = 1
    Else
        local $withGroupCorrect = 0
    EndIf

        if $sFile1 <> "" Then
            mainStart($sFile1, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile2 <> "" Then
            mainStart($sFile2, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile3 <> "" Then
            mainStart($sFile3, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile4 <> "" Then
            mainStart($sFile4, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile5 <> "" Then
            mainStart($sFile5, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile6 <> "" Then
            mainStart($sFile6, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile7 <> "" Then
            mainStart($sFile7, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile8 <> "" Then
            mainStart($sFile8, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile9 <> "" Then
            mainStart($sFile9, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile10 <> "" Then
            mainStart($sFile10, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        MsgBox($MB_SYSTEMMODAL, "checker", "Vorgang vollständig beendet. Sofern es Fehler gab, existiert ein Log")

        ; DropIn Felder leeren
        GUICtrlSetData($dropFile_1, "")
        GUICtrlSetData($dropFile_2, "")
        GUICtrlSetData($dropFile_3, "")
        GUICtrlSetData($dropFile_4, "")
        GUICtrlSetData($dropFile_5, "")
        GUICtrlSetData($dropFile_6, "")
        GUICtrlSetData($dropFile_7, "")
        GUICtrlSetData($dropFile_8, "")
        GUICtrlSetData($dropFile_9, "")
        GUICtrlSetData($dropFile_10, "")
     
  EndSwitch
WEnd

 

Edited by apbonn
Link to comment
Share on other sites

If you create a GUI that's always on top, you need to make sure to make the MsgBox a child of the GUI by passing the GUI's handle to the MsgBox function...

Local $hGUI = GUICreate("My GUI", -1, -1, -1, -1, -1, $WS_EX_TOPMOST)

MsgBox($MB_OK, "Child Window!", "Hey look! I'm on top!", 0, $hGUI)
Edited by seadoggie01
Found $WS_EX_TOPMOST

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

12 minutes ago, seadoggie01 said:

If you create a GUI that's always on top, you need to make sure to make the MsgBox a child of the GUI by passing the GUI's handle to the MsgBox function...

Local $hGUI = GUICreate("My GUI") ; I don't remember code to make it always on top... but you got that already

MsgBox($MB_OK, "Child Window!", "Hey look! I'm on top!", 0, $hGUI)

great, now my MSG Boxes are over the main window, thank you :)

but if i add

Opt("GUIOnEventMode", 1)

no button is working anymore and the cpu goes crazy

Edited by apbonn
Link to comment
Share on other sites

Don't do that. Like Danp2 said, you shouldn't use a message handling loop AND GUIEvents... they both handle events, just in different ways. Your code is setup without events right now, so stick with that.

To fix your code, you'll need to remove the GUIOnEventMode line and the line adding an event to your checkbox. When your checkbox is clicked, GUIGetMsg() will return your checkbox's ID... so you add something like this to your Switch Case code...

Case $idCheckboxGroup
    ; This is the code to run when your checkbox is clicked, previously your Checkbox1Click() function
    If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then
        GUICtrlSetState($idCheckboxFixGroup, $GUI_ENABLE)
    Else
        GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE)
    EndIf

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

It sounds like you didn't put it in the right place. It goes inside the Switch statement you already have, like I said in the previous message

10 minutes ago, seadoggie01 said:

so you add something like this to your Switch Case code...

That's a syntax error and we won't really be good at helping with those, you need to check your code and put in a little work to get things like that working. I'm not trying to come off as upset here, I just can't debug something like that very well remotely.

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

it looks like this now

 

Opt("MustDeclareVars", 1)

Local $dropFile_1, $dropFile_2, $label, $msg, $dropFile_3, $dropFile_4, $dropFile_5, $dropFile_6, $dropFile_7, $dropFile_8, $dropFile_9, $dropFile_10

local $myGUI = GUICreate('XML ressource checker', 530, 470, @DesktopWidth / 2 - 192, _
    @DesktopHeight / 2 - 235, -1, $WS_EX_ACCEPTFILES + $WS_EX_TOPMOST)

GUICtrlCreateGroup("XML Files", 5, 5, 510, 460)
GUICtrlCreateLabel('File 1:', 20, 30)
$dropFile_1 = GUICtrlCreateInput("", 80, 30, 400, 20, -1)
GUICtrlSetState($dropFile_1, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_1, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 2:', 20, 60)
$dropFile_2 = GUICtrlCreateInput("", 80, 60, 400, 20, -1)
GUICtrlSetState($dropFile_2, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_2, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 3:', 20, 90)
$dropFile_3 = GUICtrlCreateInput("", 80, 90, 400, 20, -1)
GUICtrlSetState($dropFile_3, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_3, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 4:', 20, 120)
$dropFile_4 = GUICtrlCreateInput("", 80, 120, 400, 20, -1)
GUICtrlSetState($dropFile_4, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_4, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 5:', 20, 150)
$dropFile_5 = GUICtrlCreateInput("", 80, 150, 400, 20, -1)
GUICtrlSetState($dropFile_5, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_5, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 6:', 20, 180)
$dropFile_6 = GUICtrlCreateInput("", 80, 180, 400, 20, -1)
GUICtrlSetState($dropFile_6, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_6, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 7:', 20, 210)
$dropFile_7 = GUICtrlCreateInput("", 80, 210, 400, 20, -1)
GUICtrlSetState($dropFile_7, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_7, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 8:', 20, 240)
$dropFile_8 = GUICtrlCreateInput("", 80, 240, 400, 20, -1)
GUICtrlSetState($dropFile_8, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_8, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 9:', 20, 270)
$dropFile_9 = GUICtrlCreateInput("", 80, 270, 400, 20, -1)
GUICtrlSetState($dropFile_9, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_9, 'You can drag & drop files here...')

GUICtrlCreateLabel('File 10:', 20, 300)
$dropFile_10 = GUICtrlCreateInput("", 80, 300, 400, 20, -1)
GUICtrlSetState($dropFile_10, $GUI_DROPACCEPTED)
GUICtrlSetTip($dropFile_10, 'You can drag & drop files here...')

Local $idCheckboxUseless = GUICtrlCreateCheckbox ( "Suche fehlende Ressourcen", 80, 320  )
Local $idCheckbox = GUICtrlCreateCheckbox ( "Log mit Timestamp", 80, 400  )
Local $idCheckboxGroup = GUICtrlCreateCheckbox ( "Suche fehlende Ressourcen anhand der GroupID", 80, 360  )
Local $idCheckboxFixGroup = GUICtrlCreateCheckbox ("Adde gefundene Ressoucren mit identischer GroupID", 80, 380  )
Local $idCheckboxRef = GUICtrlCreateCheckbox ( "Lösche nicht gefundene Ressourcen ", 80, 340  )


Local $idStart = GUICtrlCreateButton("XMLs prüfen", 215, 420, 100, 25)
Local $sFile1, $sFile2,$sFile3, $sFile4,$sFile5, $sFile6,$sFile7, $sFile8,$sFile9, $sFile10
GUICtrlSetState($idCheckboxUseless, $GUI_DISABLE)
GUICtrlSetState($idCheckboxUseless, $GUI_CHECKED)
GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE)



   

Case $idCheckboxGroup
    ; This is the code to run when your checkbox is clicked, previously your Checkbox1Click() function
    If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then
        GUICtrlSetState($idCheckboxFixGroup, $GUI_ENABLE)
    Else
        GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE)
    EndIf


GUISetState()
While 1
  $msg = GUIGetMsg()
  Switch $msg
    Case $GUI_EVENT_CLOSE
      GUIDelete()
      ExitLoop
    Case $GUI_EVENT_DROPPED
      If @GUI_DropId = $dropFile_1 Then
        GUICtrlSetData($dropFile_1, @GUI_DragFile)
      ElseIf @GUI_DropId = $dropFile_2 Then
        GUICtrlSetData($dropFile_2, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_3 Then
        GUICtrlSetData($dropFile_3, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_4 Then
        GUICtrlSetData($dropFile_4, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_5 Then
        GUICtrlSetData($dropFile_5, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_6 Then
        GUICtrlSetData($dropFile_6, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_7 Then
        GUICtrlSetData($dropFile_7, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_8 Then
        GUICtrlSetData($dropFile_8, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_9 Then
        GUICtrlSetData($dropFile_9, @GUI_DragFile)
    ElseIf @GUI_DropId = $dropFile_10 Then
        GUICtrlSetData($dropFile_10, @GUI_DragFile)
      EndIf
    Case $idStart
      $sFile1 = GUICtrlRead($dropFile_1)
      $sFile2 = GUICtrlRead($dropFile_2)
      $sFile3 = GUICtrlRead($dropFile_3)
      $sFile4 = GUICtrlRead($dropFile_4)
      $sFile5 = GUICtrlRead($dropFile_5)
      $sFile6 = GUICtrlRead($dropFile_6)
      $sFile7 = GUICtrlRead($dropFile_7)
      $sFile8 = GUICtrlRead($dropFile_8)
      $sFile9 = GUICtrlRead($dropFile_9)
      $sFile10 = GUICtrlRead($dropFile_10)
      
    
   
    If GUICtrlRead($idCheckbox) = $GUI_CHECKED Then
        local $withLog = 1
    Else
        local $withLog = 0
    EndIf
    If GUICtrlRead($idCheckboxRef) = $GUI_CHECKED Then
        local $withRef = 1
    Else
        local $withRef = 0
    EndIf
    If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then
        local $withGroup = 1
    Else
        local $withGroup = 0
    EndIf
    If GUICtrlRead($idCheckboxFixGroup) = $GUI_CHECKED Then
        local $withGroupCorrect = 1
    Else
        local $withGroupCorrect = 0
    EndIf

        if $sFile1 <> "" Then
            mainStart($sFile1, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile2 <> "" Then
            mainStart($sFile2, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile3 <> "" Then
            mainStart($sFile3, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile4 <> "" Then
            mainStart($sFile4, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile5 <> "" Then
            mainStart($sFile5, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile6 <> "" Then
            mainStart($sFile6, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile7 <> "" Then
            mainStart($sFile7, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile8 <> "" Then
            mainStart($sFile8, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile9 <> "" Then
            mainStart($sFile9, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        if $sFile10 <> "" Then
            mainStart($sFile10, $withLog, $withRef, $withGroup, $withGroupCorrect)
        EndIf
        MsgBox($MB_SYSTEMMODAL, "XML ressource checker", "Vorgang vollständig beendet. Sofern es Fehler gab, existiert ein Log", 0, $myGUI)

        ; DropIn Felder leeren
        GUICtrlSetData($dropFile_1, "")
        GUICtrlSetData($dropFile_2, "")
        GUICtrlSetData($dropFile_3, "")
        GUICtrlSetData($dropFile_4, "")
        GUICtrlSetData($dropFile_5, "")
        GUICtrlSetData($dropFile_6, "")
        GUICtrlSetData($dropFile_7, "")
        GUICtrlSetData($dropFile_8, "")
        GUICtrlSetData($dropFile_9, "")
        GUICtrlSetData($dropFile_10, "")
     
  EndSwitch
WEnd

 

Link to comment
Share on other sites

Please re-read the messages I already posted. I'm getting tired of this honestly, I'm not repeating myself or spoon feeding you the code

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

im sorry , but i dont get it, i dont have any switch case code, and you see all of my code, the rest is only a big function which is only called if a button is pressed.

so the issue has to be in that code snipped i allready posted. i never used a switch case statement

Link to comment
Share on other sites

7 minutes ago, apbonn said:

Switch $msg     Case $GUI_EVENT_CLOSE

I'm confused... what do you think this code is?

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...