Jump to content

teodoric666

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

210 profile views

teodoric666's Achievements

  1. Very thank's
  2. I made an exe to save the AppData directory it works quite well I would like to add a progress bar but I am unable to, I don't have the level can anyone help me if not is not too complicated for you of course Thanks a lot #include <FileConstants.au3> #include <File.au3> #include <Date.au3> $date = @MDAY & "-" & @MON Local $AppDataPath = @AppDataDir Local $LocalAppDataPath = @LocalAppDataDir Local $BackupPath = "D:\" & $date & '.\Backup' Local $Search = FileFindFirstFile($AppDataPath & "\*.*") FileClose($Search) ; Copie récursive des fichiers et dossiers Func CopyFolder($SourcePath, $DestPath) Local $Search = FileFindFirstFile($SourcePath & "\*.*") If $Search = -1 Then Return Local $CopiedFiles = 0 While 1 Local $File = FileFindNextFile($Search) If @error Then ExitLoop If Not @extended Then ; Fichier trouvé, copie vers le répertoire de sauvegarde FileCopy($SourcePath & "\" & $File, $DestPath & "\" & $File, $FC_OVERWRITE) $CopiedFiles += 1 ElseIf StringInStr(FileGetAttrib($SourcePath & "\" & $File), "D") Then ; Dossier trouvé, récursion If $File <> "." And $File <> ".." Then DirCreate($DestPath & "\" & $File) CopyFolder($SourcePath & "\" & $File, $DestPath & "\" & $File) EndIf EndIf WEnd FileClose($Search) EndFunc ; Début de la copie des répertoires AppData, Local et Roaming CopyFolder($AppDataPath, $BackupPath &"\AppData\Roaming") CopyFolder($LocalAppDataPath, $BackupPath &"\AppData\Local") ; Affichage du message à la fin de la copie MsgBox(64, "Copie terminée", "La sauvegarde des répertoires Roaming , Local est terminée.")
  3. It seems to work I'm sharing it it must not be perfect but I'm moving forward thank you very much #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <Date.au3> $date = @MDAY & "-" & @MON $today = @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC Local $sourceFolder = @UserProfileDir & "\Documents" Local $backupFolder = "E:\" & $date & "\Documents" Local $logFile = @ScriptDir & "\robocopy.log" ; Vérifier si le dossier de sauvegarde existe, sinon le créer If Not FileExists($backupFolder) Then DirCreate($backupFolder) EndIf ; Exécuter Robocopy pour copier le contenu de la bibliothèque "Mes Documents" vers le dossier de sauvegarde Local $result = RunWait(@ComSpec & ' /c ROBOCOPY "' & $sourceFolder & '" "' & $backupFolder & '" /E /NP /R:2 /W:2 /LOG:' & $logFile, "", @SW_MINIMIZE) ; Vérifier si la sauvegarde a réussi en vérifiant le contenu du fichier journal If FileExists($logFile) Then If StringInStr(FileRead($logFile), "Succès") Then MsgBox($MB_ICONINFORMATION, "Sauvegarde réussie", "La sauvegarde de la bibliothèque 'Mes Documents' a été effectuée avec succès.") Else MsgBox($MB_ICONERROR, "Erreur lors de la sauvegarde", "Une erreur s'est produite lors de la sauvegarde de la bibliothèque 'Mes Documents'.") EndIf FileDelete($logFile) ; Supprimer le fichier journal après vérification ;Else ; MsgBox($MB_ICONERROR, "Erreur lors de la sauvegarde", "Une erreur s'est produite lors de la sauvegarde de la bibliothèque 'Mes Documents'.") EndIf Exit
  4. hello it's still my discoveries autoit I would like to save the directory "MY DOCUMENTS" without the subfolders my images, my videos, my music. I use a robocopy script which is not mine but found here (-https://mgxp.blogspot.com/2016/06/robobackup7z-autoit-script-to-backup.html) I don't know if I'm allowed to post a link ? the backup directory is created but the copy is not good thanks in advance #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <Date.au3> $date = @MDAY & "-" & @MON $today = @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC DirCreate("D:\" & $date & '.\Mes Documents') Local $dest = "D:\" & $date & ".\Mes Documents\" $excludeFolders = ("@MyDocumentsDir\Ma musique") $excludeFolders = ("@MyDocumentsDir\Mes images") $excludeFolders =("@MyDocumentsDir\Mes videos") $source = '"' & (@UserProfileDir & "\Documents") & '"' $dest = ("D:\" &($date) & 'Documents') RunWait(@ComSpec & " /c ROBOCOPY " & $source & " " & $dest & _ " /MIR /R:2 " & " /TEE /XF desktop.ini", @ScriptDir, @SW_MINIMIZE) Sleep(2000) If @error Then MsgBox(2,"Erreur", "Une erreur s'est produite lors de la sauvegarde.") Else MsgBox(0,"Succès", "La sauvegarde a été effectuée avec succès.") EndIf Exit
  5. it's just tests that I'm doing because I've been starting autoit for a month and I'm having a lot of trouble with inputs and outputs and how to recover the data, there is no desire to hack and if my post bothers I understand and remove it immediately I put a password as I would have put any data a text for example.
  6. ah !!!! yes !!!!! thank's
  7. hello still in my research I have problems displaying passwords in the window and then copying, thank you , my test code just for the fun #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $hGUI, $hOutput, $hCopyButton $hGUI = GUICreate("test pass", 400, 300) GUICtrlCreateButton("pass", 50, 50, 300, 30) GUICtrlSetOnEvent(-1, "GeneratePassword") $hOutput = GUICtrlCreateEdit("", 50, 100, 300, 150) ;GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetState(-1, $GUI_SHOW) $hCopyButton = GUICtrlCreateButton("Copy", 50, 260, 100, 30) GUICtrlSetOnEvent(-1, "CopyPassword") GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func GeneratePassword() Local $length = Random(8, 16, 1) ; Longueur du mot de passe (entre 8 et 16 caractères) Local $password = GenerateRandomPassword($length) GUICtrlSetData($hOutput, $password) EndFunc Func GenerateRandomPassword($length) Local $characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+{}[]|\/?<>,." Local $password = "" For $i = 1 To $length $password &= StringMid($characters, Random(1, StringLen($characters), 1), 1) Next Return $password EndFunc Func CopyPassword() Local $password = GUICtrlRead($hOutput) ClipPut($password) MsgBox(0, "Copy", "the password has been copied to the clipboard.") EndFunc
  8. hello I have a small problem with koda when I create a background image and buttons or input these do not work well even when putting the image in the background the image is here for exemple -https://fr.pngtree.com/freebackground/powder-smoke-colorful-background_2379658.html thank's image.au3
  9. thank you very much, deal done, great job
  10. hello everyone I started a project but I'm getting lost and as I'm starting out it's quite complicated here I have a form of url and I have to modify it with a click and copy it to the clipboard and. or open it directly through the browser the 1er URL for example is https://www1.essaiessai.frc/testeer/seconders/test/1050500-pkoi-passere-2020-tester-ceci-old-renewv4587 the url once modified must recover the number (for this exemple 1050500 ) and be in this way https://www1.essaiessai.frc/rss/download?id=1050500&passkey=1t45y84x68z214gh12589j5k12lo7855 I spent 10 days on it but now I'm drying up https://www1.essaiessai.frc/rss/download?id=s://www1.essaiessai.frc/testeer/seconders/test/1050500-pkoi-passere-2020-tester-ceci-old-renewv4587&passkey=Cy3Fw7Qp6Ka2Jr3Rg5Qu1Ko3Es6Oe3Pm8Jj0Ip2Ym1Nt1It5Du4Wb6Yn1Yj5Cx8Fi1Kw6Or3Dg4Uu0Nj2Wo3Rp3Nb6Hv6Jd1 this is what i get i suck URL-test-EN.au3
  11. I added a wav sound, it seems correct or can we optimize it? well it seems to work deleting the file but can we have the sound at the same time as the logo display? very thank's #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\..\1.ico #AutoIt3Wrapper_Outfile=444.exe #AutoIt3Wrapper_Res_File_Add=C:\Users\Thierry\Desktop\top-forum\Fadin autoit\1.wav #AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, splash.png, rcdata, TEST_PNG_1, 0 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Region #EndRegion #include "ResourcesEx.au3" #include <GDIPlus.au3> #Include <File.au3> #Include <WinAPI.au3> #include <WindowsConstants.au3> #include <GuiConstants.au3> #include <Sound.au3> FileInstall("1.wav", @TempDir & "\1.wav", 1) SoundPlay (@TempDir & ".\1.wav", 1) Opt("MustDeclareVars", 0) Global Const $AC_SRC_ALPHA = 1 Global $old_string = "", $runthis = "" Global $launchDir = @DesktopDir ; Load PNG file as GDI bitmap _GDIPlus_Startup() $hImage = _Resource_GetAsImage("TEST_PNG_1") ; Extract image width and height from PNG $width = _GDIPlus_ImageGetWidth ($hImage) $height = _GDIPlus_ImageGetHeight($hImage) ; Create layered window $GUI = GUICreate("Toro Loader", $width, $height, -1, -1, $WS_POPUP, $WS_EX_LAYERED) SetBitMap($GUI, $hImage, 0) ; Register notification messages GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") GUISetState() WinSetOnTop($gui,"",1) ;fade in png background for $i = 0 to 255 step 5 SetBitMap($GUI, $hImage, $i) sleep(20) next sleep(2000) ;fade out png background for $i = 255 to 0 step -5 SetBitMap($GUI, $hImage, $i) Sleep(20) next ; Release resources _WinAPI_DeleteObject($hImage) _GDIPlus_Shutdown() ; ==================================================================================================== ;=========================== ; Handle the WM_NCHITTEST for the layered window so it can be dragged by clicking anywhere on the image. ; ==================================================================================================== ;=========================== Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam) if ($hWnd = $GUI) and ($iMsg = $WM_NCHITTEST) then Return $HTCAPTION EndFunc ; ==================================================================================================== ;=========================== ; SetBitMap ; ==================================================================================================== ;=========================== Func SetBitmap($hGUI, $hImage, $iOpacity) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize ) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha" , $iOpacity ) DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC (0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC ($hMemDC) EndFunc ;Sleep (2000) FileDelete (@TempDir& ".\1.wav")
  12. lol my translator failed I understood that with the UDF and reshacker it included the image the rest is incidental and for the purposes of knowing thank you both
  13. I'm going to go further and I won't bother you any more so I'm starting to get a taste Autoit but it's complex if I want to bring the photo into my exe put it in a windows temp directory and display it afterwards? fileInstall("test.png", @tempDir & "\test.png") its good ? but to display it? $hImage = _GDIPlus_ImageLoadFromFile(".\1test.png") or $hImage = _GDIPlus_ImageLoadFromFile("1test.png") thank's
×
×
  • Create New...