Ich hab schon einiges wieder verändert, deswegen sind vllt ein paar variablen ungenutzt
PHP Code:
#include <ScreenCapture.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=d:\neuer ordner\koda_1.7.3.0\forms\spybot.kxf
$Form1_1_1 = GUICreate("Bot", 243, 244, 192, 124)
$Label1 = GUICtrlCreateLabel("Start", 16, 16, 31, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Start", 16, 40, 73, 33)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("How long between screens", 104, 16, 133, 17)
$Input1 = GUICtrlCreateInput("5", 104, 40, 89, 21)
$Label4 = GUICtrlCreateLabel("msec", 200, 40, 37, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("How many?", 104, 80, 60, 17)
$Input2 = GUICtrlCreateInput("20", 104, 104, 97, 21)
$Label6 = GUICtrlCreateLabel("JPG's", 208, 104, 31, 17)
GUICtrlSetFont(-1, 9, 400, 0, "MS Sans Serif")
$Button3 = GUICtrlCreateButton("Load config", 104, 152, 97, 25)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button4 = GUICtrlCreateButton("Open", 16, 152, 73, 25)
$Label2 = GUICtrlCreateLabel("Beta 1.0.2", 8, 112, 93, 16)
GUICtrlSetFont(-1, 9, 400, 0, "Ethnocentric")
$Label7 = GUICtrlCreateLabel("Ordner für die Bilder:", 16, 184, 100, 17)
$Input3 = GUICtrlCreateInput("d:\ImagesbyBot", 16, 208, 193, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("{F5}", "_stop")
HotKeySet("{F8}", "_folder")
#RequireAdmin
$oCreator="Ludder"
$otime= @MDAY&"." &@MON&"."&@YEAR&"|" &@hour&"Uhr " &@MIN&"Min " &@SEC&"Sec "
$versuche= 2
$versuche2=4
While 1
if ProcessExists("screenshotprogramm.exe") Then
GUISetState(@sw_hide)
msgbox(16, "Error", "Programm alredy exists")
exitloop
exit
endif
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button4
if FileExists(GUICtrlRead($input3)) Then
ShellExecute(GUICtrlRead($input3))
Else
msgbox(16, "Error", "Cannot open "&GUICtrlRead($input3))
endif
case $Button3
GUICtrlSetData($Input1,IniRead(GUICtrlRead($input3), "oBot", "sec", ""))
GUICtrlSetData($Input2,IniRead(GUICtrlRead($input3), "oBot", "times", ""))
case $Button1
if not FileExists(GUICtrlRead($input3)) then
DirCreate(GUICtrlRead($input3))
endif
if GUICtrlRead($input3) = "" then
for $i=1 to $versuche2
next
msgbox(16, "Folder", "Bitte geb einen Pfad an oder einen Ordner")
$Input3 = GUICtrlCreateInput("D:\ImagesbyBot", 16, 208, 193, 21)
GUISetState(@SW_SHOW)
EndIf
GUISetState(@sw_hide)
$input=Inputbox("Passwort", "Bitte gib das Passwort ein")
if $input="Dj Ludder" Then
TrayTip("Succefully", "Das eingegebene Passwort ist richtig", "")
sleep(3000)
Else
for $i=1 to $versuche
msgbox(16, "Error", "Passwort ist falsch")
$input=Inputbox("Passwort", "Bitte gib das Passwort ein")
next
msgbox(16, "Error", "3 versuche fehlgeschlagen," & @CRLF & _
"bitte programm neu starten")
exit
endif
$iniwrite1=IniWrite(GUICtrlRead($input3)&"\Bot.ini", "oTime", "oProjekt_oTime", $otime)
$iniwrite2=IniWrite(GUICtrlRead($input3)&"\Bot.ini", "oCreator", "oProjekt_oCreator", $ocreator)
$iniwrite3=iniwrite(GUICtrlRead($input3)&"\Bot.ini", "oBot", "sec", GUICtrlRead($Input1))
$iniwrite4=iniwrite(GUICtrlRead($input3)&"\Bot.ini", "oBot", "times", GUICtrlRead($Input2))
$iniread1=Iniread(GUICtrlRead($input3)&"\Bot.ini", "oBot", "sec", GUICtrlRead($Input1))
$iniread3=IniRead(GUICtrlRead($input3)&"\Bot.ini", "oBot", "times", GUICtrlRead($Input3))
TrayTip("Folder", "Open Folder with F8" &@CRLF& _
"Stop Manager with F5", "")
for $i=1 to GUICtrlRead($Input2)
sleep(guictrlread($input1))
ToolTip("Gemachte Bilder:" & $i& @CRLF & _
"Noch zu machende Bilder:" & GUICtrlRead($Input2) - $i , 0, 0, "Fortschritt")
_ScreenCapture_Capture(GUICtrlRead($Input3)&"\Capture " &@HOUR&"Uhr " &@MIN&"min " &@SEC&"sec " & ".png")
next
exit
EndSwitch
WEnd
func _stop()
Exit
EndFunc
func _folder()
if FileExists(GUICtrlRead($input3))then
ShellExecute(GUICtrlRead($input3))
Else
msgbox(16, "Folder", "Folder does not exist, it will created")
DirCreate(GUICtrlRead($input3))
IniWrite(GUICtrlRead($input3), "oDirCreate", "created", $dircreate)
ShellExecute(GUICtrlRead($input3))
endif
EndFunc