Jump to content

Recommended Posts

Posted (edited)
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <GUIListBox.au3>
#include <misc.au3>

Opt("TrayIconHide", 1)

Opt("GUIOnEventMode", 1)

Global $GUI1, $GUI2, $GUI3, $GUI4, $GUI5, $GUI6, $GUI7, $GUI8 = 9999
Global $Button1,$Button2,$Button3= 9999 ; Predeclare the variables with dummy values to prevent firing the Case statements
Global $Combo1, $Input1 = 9999 ;

gui1()

Func gui1()
      $GUI1 = GUICreate("Anti-Talebe", 875, 500, 300, 100, BitOR($WS_SYSMENU, $WS_CAPTION))
      GUISetBkColor ( 0x2A2A2A )
      WinSetOnTop($gui1,"",1)  ;


      $Group1 = GUICtrlCreateGroup("", 25, 50, 400, 250)
      GUICtrlCreateGroup("", -99, -99, 1, 1)

      $Label1 = GUICtrlCreateLabel("Lütfen bir iş seçimi yapınız.", 50, 80, 290, 25)
      GUICtrlSetColor(-1, 0xffffff)
      GUICtrlSetFont(-1, 13, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")

      $Combo1 = GUICtrlCreateCombo("", 50, 110, 330, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
      GUICtrlSetData(-1, "E-okul|Yazılı çıkar|Arastırma ödevi|Sınav tarihleri|Slayt|Konu tekrarı|Ek süre")
      GUICtrlSetFont(-1, 12, 400, 2, "BankGothic Lt BT")

      $Button1 = GUICtrlCreateButton("Onayla", 230, 215, 150, 30)
      GUICtrlSetOnEvent(-1, "On_Button") ; Call a common button function


      $Group2 = GUICtrlCreateGroup("", 450, 50, 400, 250)
      GUICtrlSetColor($Group2, 0x111111)
      GUICtrlCreateGroup("", -99, -99, 1, 1)

      $Label2 = GUICtrlCreateLabel("Lütfen bir profil seçiniz.", 475, 80, 290, 25)
      GUICtrlSetColor(-1, 0xffffff)
      GUICtrlSetFont(-1, 13, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")

      $Combo2 = GUICtrlCreateCombo("", 475, 110, 330, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
      GUICtrlSetData(-1, "İrfan deniz|Mustafa çiçek|Hasan şahin|Galipcan milli")
      GUICtrlSetFont(-1, 12, 400, 2, "BankGothic Lt BT")

      $Input2 = GUICtrlCreateInput("Input2", 475, 218, 150, 25, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))

      $Button2 = GUICtrlCreateButton("Onayla", 657, 215, 150, 30)
      GUICtrlSetOnEvent(-1, "On_Button2") ; Call a common button function


      $Group3 = GUICtrlCreateGroup("", 135, 370, 600, 75)
      GUICtrlCreateGroup("", -99, -99, 1, 1)

      $Label3 = GUICtrlCreateLabel("Hocaefendi girişi", 135, 345, 290, 25)
      GUICtrlSetColor(-1, 0xffffff)
      GUICtrlSetFont(-1, 13, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")

      $Input3 = GUICtrlCreateInput("Input3", 225, 400, 200, 20, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
      $Button3 = GUICtrlCreateButton("Onayla", 450, 395, 150, 30)
      GUICtrlSetOnEvent(-1, "On_Button3") ; Call a common button function


      GUISetState(@SW_SHOW, $GUI1)
    Local $aCoords = 0
    While 1
        $aCoords = WinGetPos($GUI1)
        If Not @error Then
            _MouseTrap($aCoords[0], $aCoords[1], $aCoords[0] + $aCoords[2], $aCoords[1] + $aCoords[3])
        EndIf
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

        EndSwitch
    WEnd
    _MouseTrap()

      While 1
         Sleep(2)
      WEnd

   EndFunc

#EndRegion ### END ---------------------------------------------------------------------------------- ### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###  BASLANGIC


Func gui2()
      $GUI2 = GUICreate("E-okul", 200, 150, 1170, 595)
      GUISetBkColor ( 0x2A2A2A )
      GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") ; Call a common GUI close function
      WinSetOnTop($gui2,"",1)  ;

      MsgBox($MB_SYSTEMMODAL, "Süreniz başladı", "E-okulunuza bakmak için 5 dakikanız başlamıştır.", 10)

      $Label2 = GUICtrlCreateLabel("Kalan Süreniz", 30, 27, 290, 25)
      GUICtrlSetFont(-1, 16, 400, 2, "BankGothic Lt BT")
       GUICtrlSetColor(-1, 0xffffff)
      GUICtrlSetOnEvent(-1, "Label1Click")

      $CntDwn = GUICtrlCreateLabel("15", 45, 65, 150, 150)
        GUICtrlSetFont(-1, 50, 800, 55, "ariel")
         GUICtrlSetColor(-1, 0xffffff)
         GUISetState(@SW_SHOW, $GUI2)
         GUISetState(@SW_HIDE, $GUI1)

      While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
        Case $GUI_EVENT_CLOSE
         Exit
        EndSwitch

    For $i =300 to 1 Step -1
           GUICtrlSetData($CntDwn, $i)
                Sleep(1000)
    Next

        GUICtrlSetData($CntDwn, "0")
        Sleep(1000)
        Send("#r")
        Sleep(1000)
        Send("shutdown -h ")
        Send("{ENTER}")
        ExitLoop
WEnd

   EndFunc


#EndRegion ### END ---------------------------------------------------------------------------------- ### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###### E-okul###  BİTİS


#EndRegion ### END ---------------------------------------------------------------------------------- ### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###  BASLANGIC

Func gui3()
      $GUI3 = GUICreate("Gui 3",424, 251, 500, 395)
      GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") ; Call a common GUI close function

      $Label2 = GUICtrlCreateLabel("Kalan Süreniz :", 67, 70, 290, 25)
      GUICtrlSetFont(-1, 16, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")
      GUISetState()
   EndFunc

#EndRegion ### END ---------------------------------------------------------------------------------- ### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###### Yazılı çıkar###  BİTİS

#EndRegion ### END ---------------------------------------------------------------------------------- ### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###  BASLANGIC


Func gui4()
      $GUI4 = GUICreate("Gui 4",424, 251, 500, 395)
      GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") ; Call a common GUI close function

      $Label2 = GUICtrlCreateLabel("Kalan Süreniz :", 67, 70, 290, 25)
      GUICtrlSetFont(-1, 16, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")
      GUISetState()
   EndFunc

#EndRegion ### END ---------------------------------------------------------------------------------- ### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###### Arastırma ödevi###  BİTİS

#EndRegion ### END ---------------------------------------------------------------------------------- ### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###  BASLANGIC


Func gui5()
      $GUI5 = GUICreate("Gui 5",424, 251, 500, 395)
      GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") ; Call a common GUI close function

      $Label2 = GUICtrlCreateLabel("Kalan Süreniz :", 67, 70, 290, 25)
      GUICtrlSetFont(-1, 16, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")
      GUISetState()
   EndFunc

#EndRegion ### END ---------------------------------------------------------------------------------- ### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###### Sınav tarihleri###  BİTİS


#EndRegion ### END ---------------------------------------------------------------------------------- ### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###  BASLANGIC


Func gui6()
      $GUI6 = GUICreate("Gui 6",424, 251, 500, 395)
      GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") ; Call a common GUI close function

      $Label2 = GUICtrlCreateLabel("Kalan Süreniz :", 67, 70, 290, 25)
      GUICtrlSetFont(-1, 16, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")
      GUISetState()
   EndFunc


#EndRegion ### END ---------------------------------------------------------------------------------- ### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###### Slayt|Konu tekrarı###  BİTİS


#EndRegion ### END ---------------------------------------------------------------------------------- ### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###  BASLANGIC


Func gui7()
      $GUI7 = GUICreate("Gui 7",424, 251, 500, 395)
      GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") ; Call a common GUI close function

      $Label2 = GUICtrlCreateLabel("Kalan Süreniz :", 67, 70, 290, 25)
      GUICtrlSetFont(-1, 16, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")
      GUISetState()
   EndFunc


#EndRegion ### END ---------------------------------------------------------------------------------- ### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###  BİTİS


#EndRegion ### END ---------------------------------------------------------------------------------- ### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###  BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###### Ek süre###  BASLANGIC


Func gui8()
      $GUI8 = GUICreate("Gui 8",424, 251, 500, 395)
      GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close") ; Call a common GUI close function

      $Label2 = GUICtrlCreateLabel("Kalan Süreniz :", 67, 70, 290, 25)
      GUICtrlSetFont(-1, 16, 400, 2, "BankGothic Lt BT")
      GUICtrlSetOnEvent(-1, "Label1Click")
      GUISetState()
   EndFunc


#EndRegion ### END ---------------------------------------------------------------------------------- ### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###  BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###### Ömer SÖYLEMEZ###  BİTİS


#EndRegion ### END ---------------------------------------------------------------------------------- ###### C L O S E ###### C L O S E ###### C L O S E ######
#EndRegion ### END ---------------------------------------------------------------------------------- ###### C L O S E ###### C L O S E ###### C L O S E ######        BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ###### C L O S E ###### C L O S E ###### C L O S E ######


Func On_Close()
    Switch @GUI_WinHandle ; See which GUI sent the CLOSE message
        Case $GUI1
            Exit ; If it was this GUI - we exit <<<<<<<<<<<<<<<
        Case $GUI2
            GUIDelete($GUI2) ; If it was this GUI - we just delete the GUI <<<<<<<<<<<<<<<
            GUICtrlSetState($Button1, $GUI_ENABLE)
;====================================================================================>On_Button ==  == E-okul
        Case $GUI3
            GUIDelete($GUI3) ; If it was this GUI - we just delete the GUI <<<<<<<<<<<<<<<
            GUICtrlSetState($Button1, $GUI_ENABLE)
;====================================================================================>On_Button ==  == Yazılı çıkar
        Case $GUI4
            GUIDelete($GUI4) ; If it was this GUI - we just delete the GUI <<<<<<<<<<<<<<<
            GUICtrlSetState($Button1, $GUI_ENABLE)
;====================================================================================>On_Button ==  == Arastırma ödevi
        Case $GUI5
            GUIDelete($GUI5) ; If it was this GUI - we just delete the GUI <<<<<<<<<<<<<<<
            GUICtrlSetState($Button1, $GUI_ENABLE)
;====================================================================================>On_Button ==  == Sınav tarihleri
        Case $GUI6
            GUIDelete($GUI6) ; If it was this GUI - we just delete the GUI <<<<<<<<<<<<<<<
            GUICtrlSetState($Button1, $GUI_ENABLE)
;====================================================================================>On_Button ==  == Slayt
        Case $GUI7
            GUIDelete($GUI7) ; If it was this GUI - we just delete the GUI <<<<<<<<<<<<<<<
            GUICtrlSetState($Button1, $GUI_ENABLE)
;====================================================================================>On_Button ==  == Konu tekrarı
        Case $GUI8
            GUIDelete($GUI8) ; If it was this GUI - we just delete the GUI <<<<<<<<<<<<<<<
            GUICtrlSetState($Button1, $GUI_ENABLE)
;====================================================================================>On_Button ==  == Ek süre
    EndSwitch
EndFunc   ;==>On_Close

#EndRegion ### END ---------------------------------------------------------------------------------- ###### C L O S E ###### C L O S E ###### C L O S E ######
#EndRegion ### END ---------------------------------------------------------------------------------- ###### C L O S E ###### C L O S E ###### C L O S E ######        BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ###### C L O S E ###### C L O S E ###### C L O S E ######

#EndRegion ### END ---------------------------------------------------------------------------------- ###### HOCA SEC GUI ###### HOCA SEC GUI ###### HOCA SEC GUI ######
#EndRegion ### END ---------------------------------------------------------------------------------- ###### HOCA SEC GUI ###### HOCA SEC GUI ###### HOCA SEC GUI ######     BASLANGIC
#EndRegion ### END ---------------------------------------------------------------------------------- ###### HOCA SEC GUI ###### HOCA SEC GUI ###### HOCA SEC GUI ######


Func On_Button()
    Switch @GUI_CtrlId ; See which button sent the message
      Case $Button1

            If GUICtrlRead($Combo1) = "E-okul" Then
            gui2()
         EndIf
;==============================================================================================================================>On_Button ==  == E-okul
            If GUICtrlRead($Combo1) = "Yazılı çıkar" Then
            gui3()
         EndIf
;==============================================================================================================================>On_Button ==  == Yazılı çıkar
            If GUICtrlRead($Combo1) = "Arastırma ödevi" Then
            gui4()
         EndIf
;==============================================================================================================================>On_Button ==  == Arastırma ödevi
            If GUICtrlRead($Combo1) = "Sınav tarihleri" Then
            gui5()
         EndIf
;==============================================================================================================================>On_Button ==  == Sınav tarihleri
            If GUICtrlRead($Combo1) = "Slayt" Then
            gui6()
         EndIf
;==============================================================================================================================>On_Button ==  == Slayt
            If GUICtrlRead($Combo1) = "Konu tekrarı" Then
            gui7()
         EndIf
;==============================================================================================================================>On_Button ==  == Konu tekrarı
            If GUICtrlRead($Combo1) = "Ek süre" Then
            gui8()
         EndIf
;==============================================================================================================================>On_Button ==  == Ek süre

    EndSwitch
 EndFunc   ;==============================================================================================================================>On_Button

Func On_Button3()
  If GUICtrlRead($Input3) <> "1" and GUICtrlRead($Input3) <> "1" Then
                MsgBox(0, "active", "no problem")
            ElseIf
                MsgBox(0, "pasif", "try again")
                GUISetState(@SW_HIDE)

            EndIf


 EndFunc   ;==============================================================================================================================>On_Button

#EndRegion ### END ---------------------------------------------------------------------------------- ###### HOCA SEC GUI ###### HOCA SEC GUI ###### HOCA SEC GUI ######
#EndRegion ### END ---------------------------------------------------------------------------------- ###### HOCA SEC GUI ###### HOCA SEC GUI ###### HOCA SEC GUI ######     BİTİS
#EndRegion ### END ---------------------------------------------------------------------------------- ###### HOCA SEC GUI ###### HOCA SEC GUI ###### HOCA SEC GUI ######


 

Edited by JLogan3o13
Added code tags
Posted

Welcome to AutoIt and the forum!

The error messages is rather clear: You need to define the variable at the top of your script.

BTW: When posting code please use code tags (the "<>" button in the editor). Makes reading much easier ;)

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

 

Posted

You create variable $Input3 in function GUI1 with the following statement:

$Input3 = GUICtrlCreateInput("Input3", 225, 400, 200, 20, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))

A variable defined in a function has a local scope and hence gets dropped when the function ends. See the help file for details.

To solve the problem you need to define the variables in the main script (like $GUI1).

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

 

Posted
Global $GUI1, $GUI2, $GUI3, $GUI4, $GUI5, $GUI6, $GUI7, $GUI8 = 9999 
Global $Button1,$Button2,$Button3= 9999 ; Predeclare the variables with dummy values to prevent firing the Case statements 
Global $Combo1, $Input1 = 9999 ;

I don't know if you're aware of this or not, but in those statements above, only the last variable is getting a value assigned to it.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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
  • Recently Browsing   0 members

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