Global $j = 0
HotKeySet('^{F5}', '_MyFunc')
HotKeySet('^{F6}', '_MyFunc_1')
HotKeySet('{Esc}', '_Exit')
While 1
Sleep(50)
WEnd
Func _Exit()
Exit
EndFunc ;==>_Exit
Func _MyFunc()
If WinExists('[Class:Notepad]') Then
WinClose('[Class:Notepad]')
Else
Run('notepad.exe')
EndIf
EndFunc ;==>_MyFunc
Func _MyFunc_1()
$j += 1
If $j = 6 Then $j = 1
Switch $j
Case 1
ToolTip('Действие № 1', 0, 0)
Case 2
ToolTip('Действие № 2', 0, 0)
Case 3
ToolTip('Действие № 3', 0, 0)
Case 4
ToolTip('Действие № 4', 0, 0)
Case 5
ToolTip('Действие № 5', 0, 0)
EndSwitch
EndFunc ;==>_MyFunc_1