Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About the System Tray
#7
the way you have that currently setup osd is called over and over again which will cause some issues.  also need to change acc statement so it can detect when device is unplugged. i also set a check condition so osd is not called over and over again unnecessarily.

try this
Code:
Copy      Help
int ticheck
rep 
,int w=wait(-1 WV win("" "Shell_TrayWnd"))
,Acc a.Find(w "PUSHBUTTON" "Safely Remove Hardware and Eject Media" "class=ToolbarWindow32[]id=1504" 0x5 1)
,if a.NotFound
,,if ticheck =1
,,,OsdHide
,,,OnScreenDisplay "USB device plugged out" 5 0 -1 "Arial" 0 4 0xff0000
,,,ticheck=0
,else
,,if ticheck =0
,,,OnScreenDisplay "USB device plugged in" -1 0 -1 "Arial" 0 4 0xff0000
,,,ticheck=1
,0.5


Messages In This Thread
About the System Tray - by RoryT84 - 06-10-2020, 05:16 PM
RE: About the System Tray - by InterestedNewbie - 06-18-2020, 01:19 PM
RE: About the System Tray - by Gintaras - 06-18-2020, 05:50 PM
RE: About the System Tray - by RoryT84 - 06-20-2020, 09:09 PM
RE: About the System Tray - by Gintaras - 06-21-2020, 04:56 AM
RE: About the System Tray - by RoryT84 - 06-21-2020, 08:24 PM
RE: About the System Tray - by Kevin - 06-22-2020, 04:24 PM
RE: About the System Tray - by Gintaras - 06-22-2020, 04:51 PM
RE: About the System Tray - by RoryT84 - 06-23-2020, 12:05 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)