However, for some reason, when connecting such a device to a Win10 PC it appears to confuse the 'no user / user away' detection a bit.
If I connect my Jog Shuttle Pro, the program below keeps updating the 'last user activity' field. Is there an alternative way to detect if the user is gone?
(Why I need this: I change wallpapers preferably with the user NOT around, so any processing won't cause a 'hickup' during work.)
My old code is based on this:
Code: Select all
x.LASTINPUTINFO
x\cbSize = SizeOf(x)
;
OpenWindow(1,10,10,150,50,"Test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
StringGadget(1,10,20,130,20,"")
;
Repeat
WaitWindowEvent(1024)
GetLastInputInfo_(@x)
SetGadgetText(1,Str(x\dwTime))
Until Event() = #PB_Event_CloseWindow