Jump to content

2 button 1 fonction


Recommended Posts

hi,

I will want creat a program which delete cookies , files and folder in temp and tempoy internet files , history.

Hire my script

#include <GUIConstants.au3>

GUICreate("cleaner :votre choix?", 460, 250) 
$Label = GUICtrlCreateLabel("veuillez sélectioner les dossiers dans les quelles vous voulez supprimer tous les fichiers", 10, 30)

$cobutton = GUICtrlCreateCheckbox("cookies",10,80, 100, 20)
$tebutton = GuiCtrlCreatecheckbox("temp",10,110,150,20)
$te2button = GUICtrlCreateCheckbox("tempory internet files",10,140,150,20)
$hibutton = GUICtrlCreateCheckbox("historique",10,170,150,20)
$subutton = GUICtrlCreateButton("suivant",360,210,65,20)
$anbutton = GUICtrlCreateButton("annuler",280,210,65,20)

GUISetState () 

while 1
$msg = GuiGetMsg()
select
    
case $msg = $anbutton
Exit

endselect

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
wend

I woulde like to know to do for when i click on checkbox then i click on next ,i obtaint msgbox

Link to comment
Share on other sites

hi,

I will want creat a program which delete cookies , files and folder in temp and tempoy internet files , history.

Hire my script

Code was here.

I woulde like to know to do for when i click on checkbox  then i click on next ,i obtaint msgbox

<{POST_SNAPBACK}>

I have rewritten your code. One to make it follow some standards that I have for programming and organizing, and 2 because you were using some impractical methods. I hope the code below will help you along your way.

#include <GUIConstants.au3>

Dim $Label, $cobutton, $tebutton, $te2button, $hibutton, $subutton, $anbutton
Dim $r_cobutton, $r_tebutton, $r_te2button, $r_hibutton

GUICreate("cleaner :votre choix?", 460, 250) 
$Label = GUICtrlCreateLabel("veuillez sélectioner les dossiers dans les quelles vous voulez supprimer tous les fichiers", 10, 30)

$cobutton = GUICtrlCreateCheckbox("cookies",10,80, 100, 20)
$tebutton = GuiCtrlCreatecheckbox("temp",10,110,150,20)
$te2button = GUICtrlCreateCheckbox("tempory internet files",10,140,150,20)
$hibutton = GUICtrlCreateCheckbox("historique",10,170,150,20)
$subutton = GUICtrlCreateButton("suivant",360,210,65,20)
$anbutton = GUICtrlCreateButton("annuler",280,210,65,20)

GUISetState () 

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE OR $msg = $anbutton
            Exit
        Case $msg = $subutton
        ;Do your stuff here... Like... GUICtrlRead() and If...Then...EndIf and $GUI_CHECKED (constant in GUIconstants.au3)
            $r_cobutton = GUICtrlRead($cobutton)
            $r_tebutton = GUICtrlRead($tebutton)
            $r_te2button = GUICtrlRead($te2button)
            $r_hibutton = GUICtrlRead($hibutton)
            If $r_cobutton = $GUI_CHECKED Then
            ;Do something
            EndIf
            If $r_tebutton = $GUI_CHECKED Then
            ;Do something
            EndIf
            If $r_te2button = $GUI_CHECKED Then
            ;Do something
            EndIf
            If $r_hibutton = $GUI_CHECKED Then
            ;Do something
            EndIf
    EndSelect
WEnd

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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...