[Closed] Get system all tray titles by dotnet?
Hi,every one,
I am looking for a way to get all tray icon titles(text)-if I move the cursor to a tray icon,then it will shows a text of decription
just searched cgtalk,there is a way to create system tray icon,but I don’t know how to get all of them,actually,I just want to get one icon text to detect whether that exe file is running,if I can get all icon text,then I can know the text of that icon(running…)
all_title=#("Avira Status:Action required Last update:Yesterday","toolbar","some-exe-name")--some-exe-name is what I want
below is another topic example:
fn closeIcon s e = s.dispose()
fn balloonClicked s e = shelllaunch @"c:\windows\" ""
a = dotnetobject "notifyicon"
a.visible = true
a.icon = (dotnetclass "system.drawing.systemIcons").information
dotnet.addEventHandler a "BalloonTipClosed" closeIcon
dotnet.addEventHandler a "BalloonTipClicked" balloonClicked
a.showballoontip 1000 "test" "test2" (dotnetclass "tooltipicon").info
You just need to check if a certain process, of which you the filename, is running?
I know check progress is normal way,but sometimes ,an exe file run once ,then gone,progress can not detect,for example:
there is a program named main.exe,it will load other program name online.exe and offline.exe,main.exe will in progress all the time untill ends its progress,if the main.exe switch the status,it will run online.exe or offline.exe(may just run several seconds to start,then gone),both of them are loaded by main.exe,but they could not be detect in progress all the time,the main.exe will change,the question is ,I need to check what status of main.exe is,in progress ,the name of main.exe does not change…
I just talking about some times,exe cannot be detected in progress,right?Am I wrong?The tray icon of main.exe shows its status,icon does not as the same,also title or text…
below is the detecting exe progress code of dotnet:
try(for k in (DotNetClass "System.Diagnostics.Process").GetProcesses() do (print k.ProcessName))catch()