Sign in to follow this  
Followers 0
tonprofde_math

2 button 1 fonction

2 posts in this topic

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

Share this post


Link to post
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)

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