popup2 events? Thread last updated on 2004-05-26 18:38:07

Posted by member 843 on 2004-05-18 11:37:40

Does popup2 have something like a OnClose event? I read something about using One to check if the popup window is open or not, but wouldn't it be too cpu-intensive?
In my case, i'm using 6 shotcuts that open different popups, each one having a clicked state. What I wanted was to leave the associated shortcut in its clicked state until the popup menu were closed.
I was thinking about using a script as the shortcut click action to activate another script that would use One and a timer to check if there is a open popup window.. in that case, is it possible to tell each popup window apart?

Posted by member 159957 on 2004-05-18 16:10:30 link

Well I got a simmilar situation going on but in my case windows minimize when I click my popup shortcuts.
So having said that. You could
*jDeskMButton1 [.none;!none;!Your on-close actions;!none]
so when you click the desktop to make your popup disappear you get your on-close action.
offcourse if you actualy open something with the popup,you dont get to click the desktop or your !on-close action.
maybe you could work the problem from there.
like tasksOnAdd to make sure your on-close action happens if you open something from the popup.

I think you meant LiteRunner not One.

Posted by member 159957 on 2004-05-18 17:19:15 link

Tried to see if LiteRunner would doit:
*OnRun [Re5ources_PopupMenu] [] [] [!Any Action]
Doesent Work

Posted by member 843 on 2004-05-18 21:21:30 link

thanks for the reply, i'll give your solution a try later..
Actually, i got the idea from http://www.litestep.net/index.php?section=4&action=view&catId=3&id=2827&hl=popup2.
I managed to make something that could do the trick, but I realized that there were several Re5ources_PopupMenu window classes registered (8 or so) just after a !recycle, making it impossible for one to find if the popup were closed..

Posted by member 159957 on 2004-05-24 23:45:07 link

popup2 - popuponhide
Author: Message, Jesus_mjjg
Version: N/A
Date added: 2002-07-18 00:00:00
Description: Executes a bang when popup disappears.
http://www.loose-screws.com/modules.php?cat=13

Posted by member 843 on 2004-05-26 17:33:01 link

I've heard about that version, but was wondering if/why this feature wasn't added to the more recent versions of popup2, since popup2-popuponhide is almost 2 years old now..

Posted by member 159957 on 2004-05-26 18:38:07 link

Yeah,what would be cool is to have one popup module that incorporates the functionality of:
1)Popup2 with EVWM-like functionality
2)popup2 - popuponhide
3)bpopup2
All in one new popup2 module.