Function Reference

OnAutoItExitRegister

AutoIt終了時に呼ばれる関数を登録します。

OnAutoItExitRegister( "function" )

 

パラメータ

function 呼ばれるユーザー関数の名前

 

返し値

成功 1を返します。 既に登録されている場合@extendedが設定されます。
失敗 0を返します。

 

注意

終了コードを@ExitCodeで取得することができます。
終了モードを@ExitMethodで取得することができます。
0 自然終了
1 Exit関数による終了
2 システムトレイの終了をクリックしたことによる終了
3 ユーザーのログオフによる終了
4 Windowsのシャットダウンによるによる終了

 

関連

OnAutoItExitUnRegister, Exit

 


OnAutoItExitRegister("MyTestFunc")
OnAutoItExitRegister("MyTestFunc2")

Sleep(1000)

Func MyTestFunc()
    MsgBox(64, "Exit Results 1", 'Exit Message from MyTestFunc()')
EndFunc

Func MyTestFunc2()
    MsgBox(64, "Exit Results 2", 'Exit Message from MyTestFunc()')
EndFunc