| *Sym98* |
| | Ciao a tutti, ecco il mio 2° programma In poche parole serve a creare ScreenShot (foto del proprio schermo), al click su Scatta Foto oppure dopo un tempo preestabilito in millisecondi. Durante l'attesa il file dovrà restare aperto e visto che sarà in pausa si chiuderà solo con la Tray Icon. La tabella dei millisecondi è presente all'interno del programma stesso. Source setup: #RequireAdmin #include <guiconstants.au3>
$Form1 = GUICreate("Setup - ScreenShot Maker 1.0 By Sym98", 625, 445, 193, 125) GUISetIcon(@ScriptDir&"\Pic\Icon.ico") GUISetBkColor(0x000000) $Label1 = GUICtrlCreateLabel("Setup ScreenShot Maker 1.0", 72, 8, 423, 44) GUICtrlSetFont(-1, 22, 800, 0, "Comic Sans MS") GUICtrlSetColor(-1, 0x008000) $Group1 = GUICtrlCreateGroup("Help", 8, 56, 601, 337) $Pic1 = GUICtrlCreatePic("C:\Users\Sym98\Pictures\glitterfy0153943T712D32.gif", 8, 256, 601, 137) $Label2 = GUICtrlCreateLabel(FileRead("Setup.txt"), 16, 72) GUICtrlSetBkColor(-1, 0xFFFBF0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Avanti1 = GUICtrlCreateButton("Avanti", 392, 400, 121, 41, 0) $Annulla1 = GUICtrlCreateButton("Annulla", 136, 400, 121, 41, 0) GUISetState(@SW_SHOW)
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Annulla1 Exit Case $Avanti1 GUIDelete($Form1)
$Form2 = GUICreate("Setup - ScreenShotMaker 1.0 By Sym98", 377, 129, 193, 125) GUISetBkColor(0x000000) GUISetIcon(@ScriptDir&"\Pic\Icon.ico") $AvviaSetup = GUICtrlCreateButton("Avvia Setup", 8, 16, 113, 41, 0) $Dir = GUICtrlCreateInput(@ProgramFilesDir&"\ScreenShot Maker 1.0", 160, 40, 169, 27) GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS") GUICtrlSetColor(-1, 0x008000) $Indietro = GUICtrlCreateButton("Indietro", 8, 72, 113, 41, 0) $Label1 = GUICtrlCreateLabel("Created By Sym98", 160, 80, 180, 31) GUICtrlSetFont(-1, 14, 800, 0, "Comic Sans MS") GUICtrlSetColor(-1, 0xFF0000) $Label2 = GUICtrlCreateLabel("Directory di installazione", 160, 8, 164, 23) GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS") GUICtrlSetColor(-1, 0x0000FF) GUISetState(@SW_SHOW)
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Indietro $file= @ScriptName ShellExecute($file) ;Elimina questa stringa se compili il file Run($file) Exit Case $AvviaSetup $Directory= GUICtrlRead($Dir) GUIDelete($Form2) ProgressOn("Setup - ScreenShot Maker 1.0", "Installazione in corso...Attendere", "0%") For $i = 10 to 100 step 10 sleep(1000) DirCreate($Directory) FileCopy("*.*", $Directory) DirCreate($Directory&"\Pic") DirCreate($Directory&"\ScreenShot") FileCopy(@ScriptDir&"\Pic\*.*", $Directory&"\Pic\") $Desk=@DesktopDir FileCreateShortcut ($Directory&"\ScreenShot Maker 1.0.exe", $Desk&"\ScreenShot Maker.lnk")
ProgressSet( $i, $i & "%") If $i = 100 Then ExitLoop EndIf Next ProgressSet(100 , "Setup - ScreenShot Maker 1.0 By Sym98", "Installazione completata") sleep(5000) ProgressOff() Run ($Directory&"\ScreenShot Maker 1.0.exe") Exit EndSwitch WEnd
EndSwitch WEnd Source ScreenShot Maker 1.0 #RequireAdmin #include <guiconstants.au3> #Include <screencapture.au3> $var1 = @TempDir $var2 = FileRead($var1&"\count.txt") $Dir = @ScriptDir $Form1 = GUICreate("ScreenShot Maker 1.0 - By Sym98", 625, 445, 189, 128) GUISetFont(12, 800, 0, "Comic Sans MS") GUISetBkColor(0x000000) GUISetIcon($Dir&"\Pic\Icon.ico") $Label1 = GUICtrlCreateLabel("ScreenShot Maker 1.0 By Sym98 ", 160, 16, 275, 27) GUICtrlSetColor(-1, 0xFF0000) $Button1 = GUICtrlCreateButton("Scatta foto", 8, 104, 185, 49, 0) GUICtrlSetCursor (-1, 0) $Input1 = GUICtrlCreateInput("0", 280, 96, 257, 31) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x434E54) $Label2 = GUICtrlCreateLabel("Millisecondi di attesa", 328, 136, 174, 27) GUICtrlSetColor(-1, 0xFF0000) $Label3 = GUICtrlCreateLabel("Tabella Millisecondi", 216, 184, 151, 27) GUICtrlSetColor(-1, 0x00FF00) $Label4 = GUICtrlCreateLabel("1000 Millisecondi = 1 Secondo ", 0, 232, 236, 27) GUICtrlSetColor(-1, 0x3399FF) $Label5 = GUICtrlCreateLabel("10000 Mil. = 10 Sec.", 256, 232, 176, 27) GUICtrlSetColor(-1, 0x800080) $Label6 = GUICtrlCreateLabel("3600000 M. = 1 Ora", 448, 232, 173, 27) GUICtrlSetColor(-1, 0xA0A0A0) $Label7 = GUICtrlCreateLabel("60000 Mil. = 1 Minuto ", 0, 272, 188, 27) GUICtrlSetColor(-1, 0x800000) $Label8 = GUICtrlCreateLabel("1800000 Mil = 30 Min", 216, 272, 180, 27) GUICtrlSetColor(-1, 0xFFFFFF) $Label9 = GUICtrlCreateLabel("1 Mil. = 0,001", 432, 272, 121, 27) GUICtrlSetColor(-1, 0x808000) $Pic1 = GUICtrlCreatePic($Dir&"\Pic\IMG.jpg", 0, 290, 625, 137) $Opzioni = GUICtrlCreateMenu("Opzioni") $Pic=GUICtrlCreateMenu("ScreenShot", $Opzioni) $Start=GUICtrlCreateMenuItem("Apri Cartella ScreenShot", $Pic) $Screen=GUICtrlCreateMenuItem("Apri l'ultimo Screen", $Pic) $EliminaScreen=GUICtrlCreateMenuItem("Elimina tutti gli ScreenShot", $Pic) $Count=GUICtrlCreateMenu("Contatore", $Opzioni) $Azzera=GUICtrlCreateMenuItem("Azzera", $Count) $Esci=GUICtrlCreateMenuItem("Esci", $Opzioni) $Help=GUICtrlCreateMenuItem("Help", $Opzioni) $Credits=GUICtrlCreateMenu("?") $About=GUICtrlCreateMenuItem("About", $Credits) GUISetState(@SW_SHOW) GUICtrlRead($Input1)
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Help ShellExecute("About.txt") Case $Esci Exit Case $Start ShellExecute(@ScriptDir&"\ScreenShot") Case $Screen ShellExecute(@ScriptDir&"\ScreenShot\Screen_"&$var2&".jpg") If @error Then MsgBox(16, "Error", "Non sono presenti ScreenShot") Case $EliminaScreen FileDelete(@ScriptDir&"\ScreenShot\*.jpg") $X = MsgBox(4, "ScreenShot Maker 1.0", "ScreenShot eliminati."&@CRLF&"Azzerare il contatore?") If $X = 6 Then $var2 = 0 FileDelete($var1&"\count.txt") FileWrite($var1&"\count.txt", $var2) Else MsgBox(0,"Countatore", "Contatore non azzerato") EndIf Case $Azzera $X2=MsgBox(4, "Contatore", "Azzerando il contatore i prossimi ScreenShot si chiameranno nuovamente Screen_1, Screen_2 ecc.."&@CRLF&"Di conseguenza se esistono già file con quel nome verranno sostituiti. Continuare?") If $X2 = 6 Then $var2 = 0 FileDelete($var1&"\count.txt") FileWrite($var1&"\count.txt", $var2) Else MsgBox(0,"Countatore", "Contatore non azzerato") EndIf Case $About $FormAbout = GUICreate("About", 395, 289, 303, 219) GUISetIcon("D:\006.ico") $GroupBox1 = GUICtrlCreateGroup("", 0, 8, 385, 241) $ImageAbout = GUICtrlCreatePic(@ScriptDir&"\Pic\Logo Sym98.gif", 8, 24, 105, 204) $LabelAbout = GUICtrlCreateLabel("Product Name", 144, 24, 72, 17) $LabeAbout = GUICtrlCreateLabel("Version", 144, 48, 39, 17) $LabeAbout = GUICtrlCreateLabel("Copyright", 120, 104, 48, 17) $LabeAbout = GUICtrlCreateLabel("Sym98", 232, 24, 36, 17) $LabeAbout = GUICtrlCreateLabel("1.0", 216, 48, 19, 17) $LabeAbout = GUICtrlCreateLabel("ScreenShot Maker 1.0 Created By Sym98 ", 176, 104, 204, 17) $PicAbout = GUICtrlCreatePic(@ScriptDir&"\Pic\Sym98.gif", 136, 128, 201, 100) GUICtrlCreateGroup("", -99, -99, 1, 1) $ButtonAbout = GUICtrlCreateButton("&OK", 168, 256, 75, 25) GUISetState(@SW_SHOW)
While 1 $File = @ScriptName $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($FormAbout) GUIDelete($Form1) ;ShellExecute($File) ;Elimina questa riga se lo compili Run($File) Exit Case $ButtonAbout GUIDelete($FormAbout) GUIDelete($Form1) ;ShellExecute($File) ;Elimina questa riga se lo compili Run($File) Exit EndSwitch WEnd
Case $Button1 Sleep(GUICtrlRead($Input1)) $var2 = $var2 + 1 If FileExists ($var1&"\count.txt") Then FileDelete ($var1&"\count.txt") FileWrite($var1&"\count.txt", $var2) _ScreenCapture_Capture($Dir & "\ScreenShot\Screen_" & $var2 & ".jpg") EndSwitch WEnd Cale92 - Security Decompiler Team SecureFile: QUI Edited by FrontBack - 24/1/2013, 18:00
| | |
| |
|