[quote=“Duffanator”]
Problems:
- The project title has to be hard coded, I don’t know how to get the project title with any kind of scripting function.
- I’m not a Java guy so swing and I don’t get along. I’m sure there is a more elegant way of doing this.
However, it is nice to get notified if there is a message waiting and the client is not right up front or even visible.[/quote]
You can pick up the project title from a system tag. Heading home, so I can’t try it yet, but try:
[code]from javax import swing
windows = swing.JFrame.getWindows()
projectName = system.tag.read("[System]Client/System/ProjectName").value
for window in windows:
if window.isVisible:
try:
if projectName in window.getTitle():
if not window.isFocused():
window.toFront()
except AttributeError:
pass[/code]