Jump to content

checkbox not work


Recommended Posts

hi guy i write a script , but i dont know  why  the checkbox answerme always in 0 ,  but i think have worked  correctly

#cs ----------------------------------------------------------------------------

    AutoIt Version: 3.3.14.2
    Author:         faustf

    Script Function: Barby online
    Template AutoIt script.

    Feauters :
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <AutoItConstants.au3>
#include <GUIConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
#include <WinAPIRes.au3>
#include <GuiListView.au3>
#include <File.au3>
#include <GuiToolbar.au3>
#include <GUIImageList.au3>
#include <StaticConstants.au3>
#include <ToolbarConstants.au3>
#include <WinAPIShellEx.au3>
#include <GuiEdit.au3>
#include <GDIPlus.au3>
#include <Misc.au3>
#include <IE.au3>
#include <Excel.au3>

#include "include\Library.au3"

Opt("GuiOnEventMode", 1)
Opt("GUICloseOnESC", 0)
Opt("GUIResizeMode", 128)

_Gui()

Global $SITIWEB_Form2,$SITIWEB_StatusBar1,$SITIWEB_Tab1,$SITIWEB_TabSheet1,$SITIWEB_TabSheet2,$SITIWEB_Button1,$SITIWEB_Button2
Global $SITIWEB_Button3,$SITIWEB_Checkbox1,$SITIWEB_Checkbox2,$Button4,$SITIWEB_Button5,$SITIWEB_Button6

Func _Gui()

    $SITIWEB_Form2 = GUICreate("Barby Online ", 907, 553, 187, 107)
    $SITIWEB_StatusBar1 = _GUICtrlStatusBar_Create($SITIWEB_Form2)
    $SITIWEB_Tab1 = GUICtrlCreateTab(0, 24, 906, 509)
    $SITIWEB_TabSheet1 = GUICtrlCreateTabItem("eBay")
    $SITIWEB_TabSheet2 = GUICtrlCreateTabItem("Configurazione")
    GUICtrlSetState(-1, $GUI_SHOW)
    $SITIWEB_Button1 = GUICtrlCreateButton("Button1", 24, 64, 91, 81, $BS_ICON) ; mail.com
    GUICtrlSetImage(-1, "E:\Barby_online\icon\index.ico", -1)
    $SITIWEB_Button2 = GUICtrlCreateButton("Button1", 25, 153, 91, 81, $BS_ICON) ; eBay
    GUICtrlSetImage(-1, "E:\Barby_online\icon\Chrisbanks2-Cold-Fusion-Hd-Ebay.ico", -1)
    $SITIWEB_Button3 = GUICtrlCreateButton("Button1", 26, 243, 91, 81, $BS_ICON) ; PayPal
    GUICtrlSetImage(-1, "E:\Barby_online\icon\Uiconstock-E-Commerce-Paypal.ico", -1)
    $SITIWEB_Checkbox1 = GUICtrlCreateCheckbox("ID List", 144, 64, 57, 17) ; id list
    $SITIWEB_Checkbox2 = GUICtrlCreateCheckbox("Utente Standard", 144, 88, 97, 17) ; utente standard
    $Button4 = GUICtrlCreateButton("Button1", 27, 334, 91, 81, $BS_ICON) ; mix All
    GUICtrlSetImage(-1, "E:\Barby_online\icon\multy.ico", -1)
    $SITIWEB_Button5 = GUICtrlCreateButton("Configure", 28, 501, 92, 21)
    $SITIWEB_Button6 = GUICtrlCreateButton("Button6", 880, 51, 21, 20, $BS_BITMAP) ; il morto del mese
    GUICtrlSetImage(-1, "E:\Barby_online\icon\favicons.bmp", -1)
    GUICtrlCreateTabItem("")
    GUISetState(@SW_SHOW)

    GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
    GUICtrlSetOnEvent($SITIWEB_Button6, "_dead")
    GUICtrlSetOnEvent($SITIWEB_Button1, "_mail_com")

EndFunc   ;==>_Gui



Func _mail_com()

    Local $Utente_STD = GUICtrlRead($SITIWEB_Checkbox2)
    Local $ID_List = GUICtrlRead($SITIWEB_Checkbox1)
MsgBox(0,'',$ID_List)
#cs
    Select
        Case $ID_List = "0" And $Utente_STD = "0"
            MsgBox(48, "Errore", "Devi flaggare  o utente standar o id list")
        Case $ID_List = "1" And $Utente_STD = "1"
            MsgBox(48, "Errore", "Non puo flaggare ambedue solo uno ")
        Case $ID_List = "4" And $Utente_STD = "1"

            Local $SITIWEB_path = @ScriptDir & "\WEB-SITE\eBay\path_site.ini"
            Local $Utente_STD_path = @ScriptDir & "\WEB-SITE\eBay\utente_standard.ini"

            Local $sSITIWEB_Read = IniRead($SITIWEB_path, "path", "key1", "https://service.mail.com/registration.html?edition=int&lang=en&#.2859408-header-signup2-1")

            If ProcessExists("iexplore.exe") Then ; Check if the internet esplorer process is running.
                ProcessClose("iexplore.exe")
            EndIf

            Local $s1Name = IniRead($Utente_STD_path, "SU_Mail_com", "key1", "pinco")
            Local $s2Name = IniRead($Utente_STD_path, "SU_Mail_com", "key2", "pallo")
            Local $sGender = IniRead($Utente_STD_path, "SU_Mail_com", "key3", "Trans")
            Local $sDay_Born = IniRead($Utente_STD_path, "SU_Mail_com", "key4", "13")
            Local $sMonth_Born = IniRead($Utente_STD_path, "SU_Mail_com", "key5", "Dec")
            Local $sYear_Born = IniRead($Utente_STD_path, "SU_Mail_com", "key6", "1977")
            Local $sCountry = IniRead($Utente_STD_path, "SU_Mail_com", "key7", "Italy")
            Local $sDesire_Email = $s2Name & "26052016"
            Local $sPassword = IniRead($Utente_STD_path, "SU_Mail_com", "key8", "Vasodelcazzo")
            Local $s2Mail = IniRead($Utente_STD_path, "SU_Mail_com", "key9", "gino@latino.it")
            Local $sSeacret_Q = IniRead($Utente_STD_path, "SU_Mail_com", "key10", "sonasega")

            _Robot_Mail_Com($sSITIWEB_Read, $s1Name, $s2Name, $sGender, $sDay_Born, $sMonth_Born, $sYear_Born, $sCountry, $sDesire_Email, $sPassword, $s2Mail, $sSeacret_Q)


        Case $ID_List = "1" And $Utente_STD = "4"

            Local $sPath_excel = (@ScriptDir & "\WEB-SITE\eBay\cognomi.xls")
            Local $iEnd_excel = "65536"
            Local $sLetter_Excel = "A"
            Local $sCognomi_Random = _Excel_Random_Read($sPath_excel, $iEnd_excel, $sLetter_Excel)

            $sPath_excel = (@ScriptDir & "\WEB-SITE\eBay\nomi.xls")
            $iEnd_excel = "5495"
            $sLetter_Excel = "A"
            Local $sNomi_Random = _Excel_Random_Read($sPath_excel, $iEnd_excel, $sLetter_Excel)


            Local $SITIWEB_path = @ScriptDir & "\WEB-SITE\eBay\path_site.ini"
            Local $Utente_STD_path = @ScriptDir & "\WEB-SITE\eBay\utente_standard.ini"

            Local $sSITIWEB_Read = IniRead($SITIWEB_path, "path", "key1", "https://service.mail.com/registration.html?edition=int&lang=en&#.2859408-header-signup2-1")

            If ProcessExists("iexplore.exe") Then ; Check if the internet esplorer process is running.
                ProcessClose("iexplore.exe")
            EndIf

            Local $s1Name = $sNomi_Random
            Local $s2Name = $sCognomi_Random
            Local $sGender = IniRead($Utente_STD_path, "SU_Mail_com", "key3", "Trans")
            Local $sDay_Born = IniRead($Utente_STD_path, "SU_Mail_com", "key4", "13")
            Local $sMonth_Born = IniRead($Utente_STD_path, "SU_Mail_com", "key5", "Dec")
            Local $sYear_Born = IniRead($Utente_STD_path, "SU_Mail_com", "key6", "1977")
            Local $sCountry = IniRead($Utente_STD_path, "SU_Mail_com", "key7", "Italy")
            Local $sDesire_Email = $s2Name & "26052016"
            Local $sPassword = IniRead($Utente_STD_path, "SU_Mail_com", "key8", "Vasodelcazzo")
            Local $s2Mail = IniRead($Utente_STD_path, "SU_Mail_com", "key9", "gino@latino.it")
            Local $sSeacret_Q = IniRead($Utente_STD_path, "SU_Mail_com", "key10", "sonasega")

            _Robot_Mail_Com($sSITIWEB_Read, $s1Name, $s2Name, $sGender, $sDay_Born, $sMonth_Born, $sYear_Born, $sCountry, $sDesire_Email, $sPassword, $s2Mail, $sSeacret_Q)

            DirCreate(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name)

            Local $sControl = 0


            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $s1Name);,$sControl)
            $sControl += 1
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $s2Name);,$sControl)
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $sGender);,$sControl)
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $sDay_Born);,$sControl)
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $sMonth_Born);,$sControl)
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $sYear_Born);,$sControl)
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $sDesire_Email);,$sControl)
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $sPassword);,$sControl)
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $s2Mail);,$sControl)
            $sControl = "End"
            _True_write_File(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $s1Name & "_" & $s2Name & "\mail.txt", $sSeacret_Q);,$sControl)

    EndSelect
#ce
EndFunc   ;==>_mail_com








;==================================================================================================================================
Func _dead()
    ShellExecute("www1.ilmortodelmese.com")
    If @error Then MsgBox($MB_ICONERROR, 'ERROR', 'Errore inaspettato !!')
EndFunc   ;==>_dead

Func _close()
    Exit
EndFunc   ;==>_close

;===============================================================

;Keep the GUI alive

;===============================================================

While 1
    Sleep(1000)
WEnd

 

Link to comment
Share on other sites

Is it similar?

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 246, 182)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 96, 48, 97, 17)
$Button1 = GUICtrlCreateButton("Button1", 88, 96, 75, 25)
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
            Case $Button1
If GUICtrlRead($Checkbox1) = 1 Then
MsgBox(0,"status","1")
Else
MsgBox(0,"status","0")
EndIf
    EndSwitch
WEnd

 

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