How can I make it respond to one click every half second (or every quarter second)?
The computer should never be slower than the user...
Code: Select all
If OpenWindow(0, 100, 150, 300, 100, "PureBasic - SysTray Example", #PB_Window_SystemMenu)
AddSysTrayIcon(1, WindowID(0), LoadImage(0, #PB_Compiler_Home + "examples/sources/Data/Drive.bmp"))
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_SysTray
If EventType() = #PB_EventType_LeftClick
Debug "left"
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf