diff --git a/moveyourPOP.au3 b/moveyourPOP.au3 index 557c51c..29523ae 100644 --- a/moveyourPOP.au3 +++ b/moveyourPOP.au3 @@ -35,11 +35,13 @@ $color = "0x4A90E2" $color2 = "0x4A90E2" $colorbk = "0x1E1E2E" +; thunderbird doit être fermé pour lancer le script if ProcessExists("thunderbird.exe") Then MsgBox(16, "MoveYourPOP", "Veuillez fermer Thunderbird avant de lancer le script.") Exit EndIf +;gui principal $hGUI = GUICreate("MoveYourPOP", 800, 570) GUISetBkColor(0xf2f2f2) @@ -263,8 +265,11 @@ While 1 EndSwitch WEnd +;~ Func _getAllServer($profileDirectory) +; teste si le prefs.js existe +; teste si un compte POP existe +; récupère les infos des serveurs POP Func _getAllServer($profileDirectory) - GUICtrlDelete($listview) $listview = GUICtrlCreateListView("Username|Account|ID|ServerID|Dossier de stockage|smtpID|Size", 20, 220, 760, 250) GUICtrlSetData($go, "🚀 Exécuter") @@ -275,7 +280,6 @@ Func _getAllServer($profileDirectory) GUICtrlSetBkColor($labSave, 0xffffff) GUICtrlSetColor($labSave, 0x000000) - $jsFile = $proFileDirectory&"\prefs.js" if Not FileExists($jsFile) Then GUICtrlSetData($labProfile, "Pas de fichier prefs.js trouvé dans "&$profileDirectory) @@ -344,9 +348,9 @@ Func _getAllServer($profileDirectory) if $count = 0 then GUICtrlSetState($go, $GUI_DISABLE) Redim $allServer[$count][7] ;~ _ArrayDisplay($allServer) - GUICtrlDelete($listview) - $listview = GUICtrlCreateListView("Username|Account|ID|ServerID|Dossier de stockage|smtpID|Adresse du POP", 20, 220, 760, 250) - GUICtrlSetFont(-1, 11, 500, Default, "Segoe UI") + ;~ GUICtrlDelete($listview) + ;~ $listview = GUICtrlCreateListView("Username|Account|ID|ServerID|Dossier de stockage|smtpID|Adresse du POP", 20, 220, 760, 250) + ;~ GUICtrlSetFont(-1, 11, 500, Default, "Segoe UI") _GUICtrlListView_AddArray($listview, $allServer) ;~ Redim $allServer[$count][6] GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 0, -1) ; $LVSCW_AUTOSIZE @@ -367,6 +371,7 @@ Func _getAllServer($profileDirectory) GUICtrlSendMsg($ListView, $LVM_SETCOLUMNWIDTH, 7, -2) ; $LVSCW_AUTOSIZE_USEHEADER EndFunc +;fonction de sauvegarde Func _backup($source, $destination) $dateHeure = StringFormat("%02d_%02d_%04d_%02dh%02dm%02ds", @MDAY, @MON, @YEAR, @HOUR, @MIN, @SEC) $name = StringSplit($source, "\") @@ -375,6 +380,7 @@ Func _backup($source, $destination) Return $name EndFunc +;vérifie l'espace disque func _checkSpace($profileDirectory, $dstSave) Local $free, $profileSize $free = DriveSpaceFree($dstSave) @@ -384,6 +390,7 @@ func _checkSpace($profileDirectory, $dstSave) EndIf EndFunc +;récupère les infos des serveurs POP Func _getInfosAboutServer($prefsArray, $serverID) Local $aArray[4] Local $accountID