Mise à jour de l'icône et ajout de la gestion des erreurs pour Thunderbird dans moveyourPOP.au3

This commit is contained in:
jopazerty
2025-03-07 09:37:00 +01:00
parent 483cc11c58
commit 0c3106deb2
3 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=send.ico
#AutoIt3Wrapper_Icon=send-1.ico
#AutoIt3Wrapper_Outfile=..\..\..\Desktop\moveyourpop.Exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
@ -176,6 +176,7 @@ While 1
;~ $username
;~ $listAccount = _searchValueInPrefsJsArray($prefsToArray, "mail.accountmanager.accounts")
;~ _ArrayDisplay($allServer)
for $c = 0 to ubound($allServer) - 1
;~ _ArrayDisplay($allServer[$c])
$accountName = $allServer[$c][0]
@ -233,9 +234,22 @@ While 1
Next
;~ FileWrite($profileDirectory&"\user.js", 'user_pref("mail.accountmanager.accounts", "'&$listAccount&'");'&@CRLF)
EndIf
GUICtrlSetData($go, "🚀 Terminé")
GUICtrlSetState($go, $GUI_DISABLE)
GUICtrlSetBkColor($go, 0x3CB371)
MsgBox(64, "MoveYourPOP", "Terminé ✅")
GUIDelete($hGUI)
$thunderbirdPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\thunderbird.exe", "")
If FileExists($thunderbirdPath) Then
Run($thunderbirdPath)
Sleep(20000)
FileMove($profileDirectory&"\user.js", $profileDirectory&"\user.js.bak", 1)
Exit
Else
MsgBox(16, "Erreur", "Thunderbird non trouvé !"&@CRLF&"Veuillez le lancer manuellement."&@crlf&"Pensez à supprimer le fichier user.js dans le dossier du profil Thunderbird.")
Exit
EndIf
EndIf
;~ Exit
EndSwitch
@ -298,9 +312,11 @@ Func _getAllServer($profileDirectory)
$directory = StringReplace($infoServeur[3], "/", "\")
$directory = StringReplace($directory, "[ProfD]", $profileDirectory&"\")
$smtpID = _searchValueInPrefsJsArray($prefsToArray, "mail.identity."&$IDIdentity&".smtpServer")
if $smtpID = 0 Then
;~ ConsoleWrite("mail.identity."&$IDIdentity&".smtpServer"&@CRLF&$smtpID&@CRLF)
if $smtpID = "0" Then
$smtpID = _searchValueInPrefsJsArray($prefsToArray, "mail.smtp.defaultserver")
EndIf
;~ ConsoleWrite($smtpID&@CRLF)
;~ $mail = $infoServeur[4]
;~ $username = $infoServeur[2]
;~ $signature = $infoServeur[5]
@ -310,7 +326,6 @@ Func _getAllServer($profileDirectory)
$allServer[$count][3] = $serverID
$allServer[$count][4] = $directory
$allServer[$count][5] = $smtpID
;~ $allServer[$count][2] = $username
;~ $allServer[$count][3] = StringReplace($directory, "\\", "\")
;~ $allServer[$count][4] = StringReplace($signature, "\\", "\")