Je n'ai pas trouver ni dans l'aide ni sur le forum une manière de réaliser cela.
Voici mon code:
Code : Tout sélectionner
TrayCreateItem("Quitter")
TrayItemSetOnEvent(-1, "Finish 5")
Func Finish($ShutValue)
Merci de votre aide
Code : Tout sélectionner
TrayCreateItem("Quitter")
TrayItemSetOnEvent(-1, "Finish 5")
Func Finish($ShutValue)
C:\Documents and Settings\TimerOff.au3(217,45) : ERROR: Finish($ShutValue)(): undefined function.
TrayItemSetOnEvent(-1, "Finish($ShutValue)")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\TimerOff.au3(220,36) : ERROR: Finish(5)(): undefined function.
TrayItemSetOnEvent(-1, "Finish(5)")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\TimerOff.au3 - 2 error(s), 0 warning(s)
Dans cet exemple, il n'y a aucune fonction prennant un parametre en argument.timmalos a écrit :Regardez l'exemple ecrit dans la fonction GUICtrlSetOnEvent .
En effet! En regardant mieux, il y a une partie que je pensais pouvoir vous aider, mais en fait, nonlinvi a écrit :Dans cet exemple, il n'y a aucune fonction prennant un parametre en argument.timmalos a écrit :Regardez l'exemple ecrit dans la fonction GUICtrlSetOnEvent .
Code : Tout sélectionner
$parent1 = GUICreate("Parent1")
GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents")
Code : Tout sélectionner
Func SpecialEvents()
Select
Case @GUI_CtrlId = $GUI_EVENT_CLOSE
MsgBox(0, "Close Pressed", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle)
Exit
Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE
MsgBox(0, "Window Minimized", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle)
Case @GUI_CtrlId = $GUI_EVENT_RESTORE
MsgBox(0, "Window Restored", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle)
EndSelect
EndFunc ;==>SpecialEvents