#include <Misc.au3>
$dll = DllOpen("user32.dll")
While 1
Sleep ( 100 )
Select
Case _IsPressed("01", $dll)
TrayTip("", "ЛКM", 0, 0)
Case _IsPressed("02", $dll)
TrayTip("", "ПКM", 0, 0)
Case _IsPressed("04", $dll);средняя кнопка закрыть скрипт
TrayTip("", "СКM", 0, 0)
Exit
EndSelect
WEnd
DllClose($dll)