PDA

View Full Version : auto-close JRMC warning/error popups



kurtlewis
April 22nd, 2007, 09:44 AM
Was working on this a while back with Mike- Wondering if this is still the best method to 'auto kill' warning, info and error popup message in JRMC.

Reason is, I will log on to the server evry so often and there is like 50+ warning / error windows to kill from JRMC12. most of these windows are causd by a radio station not being available to play, or some error relating to a music file. It would be ideal to always auto-kill these using Girder.

Here is the last thread on it, there was another more detailed thread but it seems to have dissapeared. if there is a better method for doing this let me know, the below action script does not work reliably:





--[[
Automatically kill JRMC warning / info message windows with G4 - script by Mike C
This script runs on G4 and looks for 'warning' or 'information' window popups in JRMC.
Upon finding the window(s) it sends an 'enter' command to close it.
This is needed because sometimes a warning window popup in JRMC will freeze all MP functionality until the window is closed.
Use:
Create a script action in G4 and paste the code there.
Add an event (right click on the action), select Girder Event, select Script Enable.

--]]

local f = function ()
local h = win.FindWindow (nil,'Warning')
print (h)
if h then
gir.SendKeys (h,'<ENTER>')
end
h = win.FindWindow (nil,'Information')
if h then
gir.SendKeys (h,'<ENTER>')
end
end
JRMCTIMER = gir.CreateTimer (nil,f,nil,1)
JRMCTIMER:Arm (1000)


__________________

Promixis
April 22nd, 2007, 10:02 AM
This one works better...

Promixis
April 22nd, 2007, 10:02 AM
This one works better...

If it doesn't catch one of the JRMC dialogs, open the G5 targeting control and highlight the message box and send me a screenshot of it.

kurtlewis
April 22nd, 2007, 10:03 AM
cool cool - Thanks very Mike

kurtlewis
April 22nd, 2007, 10:25 AM
works great Mike-
The only glitch I saw was, if the warning pop-up is not the foreground window on the desktop then girder will keep 'looping' the kill script (kinda jacks up the PC) until you make JRMC the foreground application.
not a big deal, I accidentally discovered this when I was in girder just now, applied the gml, reset the lua engine.
i had JRMC popups in the background and girder went nuts looping the kill script but couldn't kill them until I changed foreground focus to JRMC.

as I said, not a big deal since I'm never on the server - but might cause an issue in a multi-zone situation. for example, watching a dvd on the server in the living room and someone in zone2 (kitchen) is playing a radio station track which pops a warning dialogue. girder might do this looping thing since the dvd player software usually takes foreground priority.

last piece of the equation now is stopping z2 from jumping back to z1 view if you can't connect to a radio station.

Promixis
April 22nd, 2007, 10:29 AM
try this than...

kurtlewis
April 22nd, 2007, 10:48 AM
thank you- that does it :)

btw i sent you a pm

Promixis
April 22nd, 2007, 11:27 AM
thank you- that does it :)

btw i sent you a pm

great :D

jwilson56
May 30th, 2007, 02:14 PM
Thanks Mike... added this to my new setup when playing around with Last.FM stuff from Marcel... will let you know if it doesn't work...

John


Ok that didn't take long.... it didn't close this error box. any chance you could update the GML to handle this error as well?


Ok I muddled my way through and seemed to add a fix for that error message. Here it is if it can help others.