Discussion:
[power-pro] do something after certain window goes to background
Petra8@rambler.ru [power-pro]
2018-01-15 16:55:13 UTC
Permalink
Is it possible do something after certain window goes to background?
When i alt+tab after a java app to any window
this new window has alt pressed.
So i'm looking workaround.
Maybe HookWindowEvents can help
but with arg(1) == 5 a window is focussed, not vice versa.
brucexs@yahoo.com [power-pro]
2018-01-15 18:34:49 UTC
Permalink
Pseudo code for hookwindowevents static javaapp =0
if (arg(1)==5) do
if win.matches(arg(2),"matching info for Java app") do
javaapp=1
else
if (javaapp) do
javaapp=0
//the code you want to run when windows activated after java app
endif
endif
endif
brucexs@yahoo.com [power-pro]
2018-01-15 18:51:39 UTC
Permalink
first line should be just static javaapp -- don't want to reset.
Petra8@rambler.ru [power-pro]
2018-01-17 20:53:01 UTC
Permalink
It works!
Thank you, Bruce, a lot!
brucexs@yahoo.com [power-pro]
2018-01-18 10:57:05 UTC
Permalink
Gload to help.

Note that this script might not be what you need if you have more than one javaapp window and you switch between them. If you have multiple java apps and alt problems with switching among them, you'll need to enhance the script. I think adding code to if (javaapp)... case might work, but I'll leave that possibility as an exercise for the reader.
Loading...