Enregistre une fonction qui est appelée à la fermeture du script.
OnAutoItExitRegister ( "function" )
function | Le nom de la fonction utilisateur à appeler. |
Succès: | Retourne 1. @extended peut être défini si déjà enregistré. |
Échec: | Retourne 0. |
Le code de sortie peut être récupéré avec @exitCode.
Le mode de sortie peut être récupéré avec @exitMethod.
$EXITCLOSE_NORMAL (0) | Termine normalement. |
$EXITCLOSE_BYEXIT (1) | Termine par la fonction Exit. |
$EXITCLOSE_BYCLICK (2) | Termine par un clic sur Fermer dans la zone de notification. |
$EXITCLOSE_BYLOGOFF (3) | Termine par déconnexion de l'utilisateur. |
$EXITCLOSE_BYSHUTDOWN (4) | Termine par arrêt de Windows. |
Exit, OnAutoItExitUnRegister, OnAutoItStartRegister
#include <MsgBoxConstants.au3> OnAutoItExitRegister("MyTestFunc") OnAutoItExitRegister("MyTestFunc2") Sleep(1000) Func MyTestFunc() MsgBox($MB_SYSTEMMODAL, "Résultat de sortie 1", 'Message de sortie à partir de MyTestFunc()') EndFunc ;==>MyTestFunc Func MyTestFunc2() MsgBox($MB_SYSTEMMODAL, "Résultat de sortie 2", 'Message de sortie à partir de MyTestFunc2()') EndFunc ;==>MyTestFunc2