Bu işini görür umarım ;
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <Misc.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=c:\documents and settings\adem.sezgin\desktop\smart tools.kxf
$Form1_1 = GUICreate("Smart Tools", 479, 168, 192, 134)
GUISetBkColor(0x9DB9EB)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close")
$combo1 = GUICtrlCreateCombo("", 144, 32, 129, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$var = WinList()
For $i = 1 to $var[0][0]
; Only display visble windows that have a title
GUICtrlSetOnEvent($combo1, "Combo1Change") ;combo görevi
If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then ;eger pencereler varsa
GUICtrlSetData(-1, $var[$i][0], "") ;bunu comboya ekle
EndIf
Next
ControlDisable("Smart Tools", "", $combo1) ;combo1i kapattık
$input1 = GUICtrlCreateInput("1", 144, 64, 41, 21)
GUICtrlCreateUpdown($input1) ;yukarı asagı görevi
ControlDisable("Smart Tools", "", $input1) ;input1 de kapattık
$Group1 = GUICtrlCreateGroup("Beklenilen İşlem", 8, 8, 273, 153)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
$Radio4 = GUICtrlCreateRadio("Pencere Kapanırsa", 16, 32, 113, 17)
GUICtrlSetOnEvent(-1, "Radio4Click")
$Radio5 = GUICtrlCreateRadio("Geri Sayım Biterse", 16, 64, 105, 17)
GUICtrlSetOnEvent(-1, "Radio5Click")
$Button2 = GUICtrlCreateButton("İşlemi Tamamla", 14, 105, 190, 45)
GUICtrlSetFont(-1, 14, 400, 0, "Arial")
GUICtrlSetOnEvent(-1, "Button2Click")
$Button3 = GUICtrlCreateButton("Vazgeç", 205, 105, 70, 45)
GUICtrlSetFont(-1, 14, 400, 0, "Arial")
GUICtrlSetOnEvent(-1, "Button3Click")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Yapılacak İşlem", 288, 8, 185, 153)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
$Radio1 = GUICtrlCreateRadio("Yeniden Başlat", 296, 32, 97, 17)
$Radio2 = GUICtrlCreateRadio("Kapat", 296, 56, 73, 17)
$Radio3 = GUICtrlCreateRadio("Uyku Modu", 296, 80, 81, 17)
$Radio6 = GUICtrlCreateRadio("Program / Müzik Başlat", 296, 104, 145, 17)
GUICtrlSetOnEvent(-1, "Radio6Click")
$Input2 = GUICtrlCreateInput("", 296, 128, 169, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Local $hDLL = DllOpen("user32.dll")
While 1
Sleep(100)
WEnd
Func Button2Click()
if GuiCtrlread($Radio4) = $GUI_CHECKED And GuiCtrlread($Radio1) = $GUI_CHECKED Then ;radio 4 ve 6 işaretrliyse
$oku = GUICtrlRead($combo1)
While 1
Local $hDLL = DllOpen("user32.dll")
If _IsPressed("10", $hDLL) Then
DllClose($hDLL)
ExitLoop
EndIf
WinWaitClose($oku)
Shutdown(2)
WEnd
EndIf
if GuiCtrlread($Radio4) = $GUI_CHECKED And GuiCtrlread($Radio2) = $GUI_CHECKED Then
$oku = GUICtrlRead($combo1)
WinWaitClose($oku)
Shutdown(1)
EndIf
if GuiCtrlread($Radio4) = $GUI_CHECKED And GuiCtrlread($Radio3) = $GUI_CHECKED Then
$oku = GUICtrlRead($combo1)
WinWaitClose($oku)
Shutdown(32)
EndIf
if GuiCtrlread($Radio4) = $GUI_CHECKED And GuiCtrlread($Radio6) = $GUI_CHECKED Then;radio 4 ve 6 işaretrliyse
$oku = GUICtrlRead($combo1)
WinWaitClose($oku)
$oku2 = GUICtrlRead($Input2)
ShellExecute($oku2)
EndIf
if GuiCtrlread($Radio5) = $GUI_CHECKED And GuiCtrlread($Radio6) = $GUI_CHECKED Then ;;;;;;;;;;;;;
Local $minute = Number(GUICtrlRead($input1))
If $minute = 0 Then Return 0
Opt("GUIOnEventMode", 0)
Local $tm_sec,$t_sec,$t_minute = 0,$timer = TimerInit()
Local $hDLL = DllOpen("user32.dll")
While $minute > $t_minute
Switch GUIGetMsg()
Case -3
Exit
Case $Button3
ToolTip("")
ControlSetText("Smart Tools" ,"", $input2 ,"")
ExitLoop
EndSwitch
$tm_sec = Int(TimerDiff($timer)) ;milli-seconds
$t_sec = Int($tm_sec / 1000) ;seconds
$t_minute = Int($t_sec / 60) ;minute
ToolTip("Belirlenen Dakika = " & $minute & @CRLF & "Geçen Dakika = " & $t_minute & @CRLF & "Saniye = " & $t_sec & @CRLF & "Mili Saniye = " & $tm_sec, 0, 0, "TimeStartExe", 1)
Sleep(25) ;Cpu Save
WEnd
Local $Return = 0
If $minute <= $t_minute Then
Local $f_execute = GUICtrlRead($Input2)
$Return = ShellExecute($f_execute)
EndIf
ToolTip("")
Opt("GUIOnEventMode", 1)
Return $Return
EndIf
if GuiCtrlread($Radio5) = $GUI_CHECKED And GuiCtrlread($Radio1) = $GUI_CHECKED Then ;;;;;;;;;;;;;
Local $minute = Number(GUICtrlRead($input1))
If $minute = 0 Then Return 0
Opt("GUIOnEventMode", 0)
Local $tm_sec,$t_sec,$t_minute = 0,$timer = TimerInit()
While $minute > $t_minute
Switch GUIGetMsg()
Case -3
Exit
;~ Case $Button3
ExitLoop
EndSwitch
$tm_sec = Int(TimerDiff($timer)) ;milli-seconds
$t_sec = Int($tm_sec / 1000) ;seconds
$t_minute = Int($t_sec / 60) ;minute
ToolTip("Belirlenen Dakika = " & $minute & @CRLF & "Geçen Dakika = " & $t_minute & @CRLF & "Saniye = " & $t_sec & @CRLF & "Mili Saniye = " & $tm_sec, 0, 0, "TimeStartExe", 1)
Sleep(25) ;Cpu Save
WEnd
Local $Return = 0
If $minute <= $t_minute Then
Shutdown(2)
EndIf
ToolTip("")
Opt("GUIOnEventMode", 1)
Return $Return
EndIf
if GuiCtrlread($Radio5) = $GUI_CHECKED And GuiCtrlread($Radio2) = $GUI_CHECKED Then ;;;;;;;;;;;;;
Local $minute = Number(GUICtrlRead($input1))
If $minute = 0 Then Return 0
Opt("GUIOnEventMode", 0)
Local $tm_sec,$t_sec,$t_minute = 0,$timer = TimerInit()
While $minute > $t_minute
Switch GUIGetMsg()
Case -3
Exit
;~ Case $Button3
;~ ToolTip("")
;~ ControlSetText("TimeStartExe" ,"", $input1 ,"")
ExitLoop
EndSwitch
$tm_sec = Int(TimerDiff($timer)) ;milli-seconds
$t_sec = Int($tm_sec / 1000) ;seconds
$t_minute = Int($t_sec / 60) ;minute
ToolTip("Belirlenen Dakika = " & $minute & @CRLF & "Geçen Dakika = " & $t_minute & @CRLF & "Saniye = " & $t_sec & @CRLF & "Mili Saniye = " & $tm_sec, 0, 0, "TimeStartExe", 1)
Sleep(25) ;Cpu Save
WEnd
Local $Return = 0
If $minute <= $t_minute Then
Shutdown(1)
EndIf
ToolTip("")
Opt("GUIOnEventMode", 1)
Return $Return
EndIf
if GuiCtrlread($Radio5) = $GUI_CHECKED And GuiCtrlread($Radio3) = $GUI_CHECKED Then ;;;;;;;;;;;;;
Local $minute = Number(GUICtrlRead($input1))
If $minute = 0 Then Return 0
Opt("GUIOnEventMode", 0)
Local $tm_sec,$t_sec,$t_minute = 0,$timer = TimerInit()
While $minute > $t_minute
Switch GUIGetMsg()
Case -3
Exit
;~ Case $Button3
;~ ToolTip("")
;~ ControlSetText("TimeStartExe" ,"", $input1 ,"")
ExitLoop
EndSwitch
$tm_sec = Int(TimerDiff($timer)) ;milli-seconds
$t_sec = Int($tm_sec / 1000) ;seconds
$t_minute = Int($t_sec / 60) ;minute
ToolTip("Belirlenen Dakika = " & $minute & @CRLF & "Geçen Dakika = " & $t_minute & @CRLF & "Saniye = " & $t_sec & @CRLF & "Mili Saniye = " & $tm_sec, 0, 0, "TimeStartExe", 1)
Sleep(25) ;Cpu Save
WEnd
Local $Return = 0
If $minute <= $t_minute Then
Shutdown(32)
EndIf
ToolTip("")
Opt("GUIOnEventMode", 1)
Return $Return
EndIf
EndFunc; buton görevinin bitişi
Func Form1_1Close()
exit 0
EndFunc
Func Radio4Click()
ControlEnable("Smart Tools", "", $combo1)
ControlDisable("Smart Tools", "", $input1)
EndFunc
Func Radio5Click()
ControlEnable("Smart Tools", "", $input1)
ControlDisable("Smart Tools", "", $combo1)
EndFunc
Func Combo1Change()
EndFunc
Func Button3Click()
EndFunc
Func Radio6Click()
Local $FileSelect = FileOpenDialog("TimeStartExe", @DesktopDir, "Program (*.exe)|Müzik (*.mp3)", 3,"",$Form1_1)
If @error Then Return SetError(1, 0, 0)
GUICtrlSetData($Input2,$FileSelect)
EndFunc
Func IsVisible($handle)
If BitAND(WinGetState($handle), 2) Then
Return 1
Else
Return 0
EndIf
EndFunc ;==>IsVisible
Bu işini görür umarım ;
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <Misc.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=c:\documents and settings\adem.sezgin\desktop\smart tools.kxf
$Form1_1 = GUICreate("Smart Tools", 479, 168, 192, 134)
GUISetBkColor(0x9DB9EB)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close")
$combo1 = GUICtrlCreateCombo("", 144, 32, 129, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$var = WinList()
For $i = 1 to $var[0][0]
; Only display visble windows that have a title
GUICtrlSetOnEvent($combo1, "Combo1Change") ;combo görevi
If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then ;eger pencereler varsa
GUICtrlSetData(-1, $var[$i][0], "") ;bunu comboya ekle
EndIf
Next
ControlDisable("Smart Tools", "", $combo1) ;combo1i kapattık
$input1 = GUICtrlCreateInput("1", 144, 64, 41, 21)
GUICtrlCreateUpdown($input1) ;yukarı asagı görevi
ControlDisable("Smart Tools", "", $input1) ;input1 de kapattık
$Group1 = GUICtrlCreateGroup("Beklenilen İşlem", 8, 8, 273, 153)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
$Radio4 = GUICtrlCreateRadio("Pencere Kapanırsa", 16, 32, 113, 17)
GUICtrlSetOnEvent(-1, "Radio4Click")
$Radio5 = GUICtrlCreateRadio("Geri Sayım Biterse", 16, 64, 105, 17)
GUICtrlSetOnEvent(-1, "Radio5Click")
$Button2 = GUICtrlCreateButton("İşlemi Tamamla", 14, 105, 190, 45)
GUICtrlSetFont(-1, 14, 400, 0, "Arial")
GUICtrlSetOnEvent(-1, "Button2Click")
$Button3 = GUICtrlCreateButton("Vazgeç", 205, 105, 70, 45)
GUICtrlSetFont(-1, 14, 400, 0, "Arial")
GUICtrlSetOnEvent(-1, "Button3Click")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Yapılacak İşlem", 288, 8, 185, 153)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
$Radio1 = GUICtrlCreateRadio("Yeniden Başlat", 296, 32, 97, 17)
$Radio2 = GUICtrlCreateRadio("Kapat", 296, 56, 73, 17)
$Radio3 = GUICtrlCreateRadio("Uyku Modu", 296, 80, 81, 17)
$Radio6 = GUICtrlCreateRadio("Program / Müzik Başlat", 296, 104, 145, 17)
GUICtrlSetOnEvent(-1, "Radio6Click")
$Input2 = GUICtrlCreateInput("", 296, 128, 169, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Local $hDLL = DllOpen("user32.dll")
While 1
Sleep(100)
WEnd
Func Button2Click()
if GuiCtrlread($Radio4) = $GUI_CHECKED And GuiCtrlread($Radio1) = $GUI_CHECKED Then ;radio 4 ve 6 işaretrliyse
$oku = GUICtrlRead($combo1)
While 1
Local $hDLL = DllOpen("user32.dll")
If _IsPressed("10", $hDLL) Then
DllClose($hDLL)
ExitLoop
EndIf
WinWaitClose($oku)
Shutdown(2)
WEnd
EndIf
if GuiCtrlread($Radio4) = $GUI_CHECKED And GuiCtrlread($Radio2) = $GUI_CHECKED Then
$oku = GUICtrlRead($combo1)
WinWaitClose($oku)
Shutdown(1)
EndIf
if GuiCtrlread($Radio4) = $GUI_CHECKED And GuiCtrlread($Radio3) = $GUI_CHECKED Then
$oku = GUICtrlRead($combo1)
WinWaitClose($oku)
Shutdown(32)
EndIf
if GuiCtrlread($Radio4) = $GUI_CHECKED And GuiCtrlread($Radio6) = $GUI_CHECKED Then;radio 4 ve 6 işaretrliyse
$oku = GUICtrlRead($combo1)
WinWaitClose($oku)
$oku2 = GUICtrlRead($Input2)
ShellExecute($oku2)
EndIf
if GuiCtrlread($Radio5) = $GUI_CHECKED And GuiCtrlread($Radio6) = $GUI_CHECKED Then ;;;;;;;;;;;;;
Local $minute = Number(GUICtrlRead($input1))
If $minute = 0 Then Return 0
Opt("GUIOnEventMode", 0)
Local $tm_sec,$t_sec,$t_minute = 0,$timer = TimerInit()
Local $hDLL = DllOpen("user32.dll")
While $minute > $t_minute
Switch GUIGetMsg()
Case -3
Exit
Case $Button3
ToolTip("")
ControlSetText("Smart Tools" ,"", $input2 ,"")
ExitLoop
EndSwitch
$tm_sec = Int(TimerDiff($timer)) ;milli-seconds
$t_sec = Int($tm_sec / 1000) ;seconds
$t_minute = Int($t_sec / 60) ;minute
ToolTip("Belirlenen Dakika = " & $minute & @CRLF & "Geçen Dakika = " & $t_minute & @CRLF & "Saniye = " & $t_sec & @CRLF & "Mili Saniye = " & $tm_sec, 0, 0, "TimeStartExe", 1)
Sleep(25) ;Cpu Save
WEnd
Local $Return = 0
If $minute <= $t_minute Then
Local $f_execute = GUICtrlRead($Input2)
$Return = ShellExecute($f_execute)
EndIf
ToolTip("")
Opt("GUIOnEventMode", 1)
Return $Return
EndIf
if GuiCtrlread($Radio5) = $GUI_CHECKED And GuiCtrlread($Radio1) = $GUI_CHECKED Then ;;;;;;;;;;;;;
Local $minute = Number(GUICtrlRead($input1))
If $minute = 0 Then Return 0
Opt("GUIOnEventMode", 0)
Local $tm_sec,$t_sec,$t_minute = 0,$timer = TimerInit()
While $minute > $t_minute
Switch GUIGetMsg()
Case -3
Exit
;~ Case $Button3
ExitLoop
EndSwitch
$tm_sec = Int(TimerDiff($timer)) ;milli-seconds
$t_sec = Int($tm_sec / 1000) ;seconds
$t_minute = Int($t_sec / 60) ;minute
ToolTip("Belirlenen Dakika = " & $minute & @CRLF & "Geçen Dakika = " & $t_minute & @CRLF & "Saniye = " & $t_sec & @CRLF & "Mili Saniye = " & $tm_sec, 0, 0, "TimeStartExe", 1)
Sleep(25) ;Cpu Save
WEnd
Local $Return = 0
If $minute <= $t_minute Then
Shutdown(2)
EndIf
ToolTip("")
Opt("GUIOnEventMode", 1)
Return $Return
EndIf
if GuiCtrlread($Radio5) = $GUI_CHECKED And GuiCtrlread($Radio2) = $GUI_CHECKED Then ;;;;;;;;;;;;;
Local $minute = Number(GUICtrlRead($input1))
If $minute = 0 Then Return 0
Opt("GUIOnEventMode", 0)
Local $tm_sec,$t_sec,$t_minute = 0,$timer = TimerInit()
While $minute > $t_minute
Switch GUIGetMsg()
Case -3
Exit
;~ Case $Button3
;~ ToolTip("")
;~ ControlSetText("TimeStartExe" ,"", $input1 ,"")
ExitLoop
EndSwitch
$tm_sec = Int(TimerDiff($timer)) ;milli-seconds
$t_sec = Int($tm_sec / 1000) ;seconds
$t_minute = Int($t_sec / 60) ;minute
ToolTip("Belirlenen Dakika = " & $minute & @CRLF & "Geçen Dakika = " & $t_minute & @CRLF & "Saniye = " & $t_sec & @CRLF & "Mili Saniye = " & $tm_sec, 0, 0, "TimeStartExe", 1)
Sleep(25) ;Cpu Save
WEnd
Local $Return = 0
If $minute <= $t_minute Then
Shutdown(1)
EndIf
ToolTip("")
Opt("GUIOnEventMode", 1)
Return $Return
EndIf
if GuiCtrlread($Radio5) = $GUI_CHECKED And GuiCtrlread($Radio3) = $GUI_CHECKED Then ;;;;;;;;;;;;;
Local $minute = Number(GUICtrlRead($input1))
If $minute = 0 Then Return 0
Opt("GUIOnEventMode", 0)
Local $tm_sec,$t_sec,$t_minute = 0,$timer = TimerInit()
While $minute > $t_minute
Switch GUIGetMsg()
Case -3
Exit
;~ Case $Button3
;~ ToolTip("")
;~ ControlSetText("TimeStartExe" ,"", $input1 ,"")
ExitLoop
EndSwitch
$tm_sec = Int(TimerDiff($timer)) ;milli-seconds
$t_sec = Int($tm_sec / 1000) ;seconds
$t_minute = Int($t_sec / 60) ;minute
ToolTip("Belirlenen Dakika = " & $minute & @CRLF & "Geçen Dakika = " & $t_minute & @CRLF & "Saniye = " & $t_sec & @CRLF & "Mili Saniye = " & $tm_sec, 0, 0, "TimeStartExe", 1)
Sleep(25) ;Cpu Save
WEnd
Local $Return = 0
If $minute <= $t_minute Then
Shutdown(32)
EndIf
ToolTip("")
Opt("GUIOnEventMode", 1)
Return $Return
EndIf
EndFunc; buton görevinin bitişi
Func Form1_1Close()
exit 0
EndFunc
Func Radio4Click()
ControlEnable("Smart Tools", "", $combo1)
ControlDisable("Smart Tools", "", $input1)
EndFunc
Func Radio5Click()
ControlEnable("Smart Tools", "", $input1)
ControlDisable("Smart Tools", "", $combo1)
EndFunc
Func Combo1Change()
EndFunc
Func Button3Click()
EndFunc
Func Radio6Click()
Local $FileSelect = FileOpenDialog("TimeStartExe", @DesktopDir, "Program (*.exe)|Müzik (*.mp3)", 3,"",$Form1_1)
If @error Then Return SetError(1, 0, 0)
GUICtrlSetData($Input2,$FileSelect)
EndFunc
Func IsVisible($handle)
If BitAND(WinGetState($handle), 2) Then
Return 1
Else
Return 0
EndIf
EndFunc ;==>IsVisible