Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About the System Tray
#6
Thank you. The Accessible Object route sounds like the easiest? My main objective is to keep the on-screen display persistent until the user plugs out the USB device after which it should either disappear (probably easier) or be replaced by another on-screen message ("USB device plugged out") which also needs to be persistent. Of course when the user plugs in the device again the "USB device plugged in" on screen display should return. 

I cannot get the on-screen display persistent in the compiled executable quite contrary to when I run the script within Quick Macros itself. I also don't know how to keep the function itself persistent without using rep (with a big number). But that's extremely messy and burdens the CPU (particularly when the device is plugged out). You probably know a cleaner and better solution then the following:


Function USB_Device
Code:
Copy      Help
rep 5000
,int w=wait(-1 WV win("" "Shell_TrayWnd"))
,Acc a.Find(w "PUSHBUTTON" "Safely Remove Hardware and Eject Media" "class=ToolbarWindow32[]id=1504" 0x1005 -1)
,OnScreenDisplay "USB device plugged in" -1 0 -1 "Arial" 0 4 0xff0000
,1
,OsdHide    
,if a.NotFound
,,OsdHide    
,,OnScreenDisplay "USB device plugged out" -1 0 -1 "Arial" 0 4 0xff0000
,,;ret


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: 1 Guest(s)