--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
> > ;check to see if parallel execution
> > if (G_InHookWindowEvents == "YES") do
> > Quit
> > endif
> > ;prevent parallel execution
> > G_InHookWindowEvents = "YES"
> >
> > Then, I put the code I really want to run, and then after that the
> end
> > of HookWindowEvents looks like this:
> > ;allow normal execution
> > G_InHookWindowEvents = "no"
> > Quit
> >
> > Has anyone else noticed something similar?
>
>
> Did you have a wait? With no wait, I don't think you can get
> parallel execution.
Well, I am glad that you tried to prevent parallel execution, but I am
using focus follows mouse and checking show desktop whenever any of
its windows is activated and you specifically warned me that this
combination is unsupported, so I guess you could say that i am begging
for trouble, especially trouble in the form of race conditions. I
just thank you for not explicitly preventing me from using it just
because it is unsupported (like so many software makers do). For the
curious, here is my HookWindowEvents script:
;keep generic previous window handle
if (arg(1) == 5) do
;not using this stuff now, uncomment when using it again
;G_PrevActiveWinHandle = G_ActiveWinHandle
;G_ActiveWinHandle = arg(2)
;also, for other stuff, keep generic previous window class
;and previous, previous window class
;G_PPActiveWinClass = G_PrevActiveWinClass
;G_PrevActiveWinClass = G_ActiveWinClass
;G_ActiveWinClass = Win.class(G_ActiveWinHandle)
;do the sending to the back
if (arg(3) == "Shell_TrayWnd" && G_SendTaskbarBack != "NO") do
window.back_("Taskbar")
endif
endif
;reset the variable telling us not to send to the back
if (arg(3) != "Shell_TrayWnd" && arg(3) != "#32768" && arg(3) !=
"#32770" && G_SendTaskbarBack != "yes") do
G_SendTaskbarBack = "yes"
;exec.tofile("C:/temp/backlog.txt", arg(1) ++ " " ++ arg(2) ++ " " ++
arg(3) ++ " " ++ arg(4) ++ " cap: " ++ captionunder)
endif
if (arg(1) == 0 ) do
;this isn't perfect....
;maybe i'll fix it one day...
;how to tell if it is a window move or size? no way...
;but we only care if the size has changed and the window is
;in our list, so check and do
;is the window in the horiz max map
winInfo = G_HorizMaxMap[arg(2)]
if (winInfo != "") do
;if the width = stored width, then we haven't horiz sized,
;so we need to leave it in the map, but if we have a different
;width, we have horiz sized after horiz max, so remove from map
;oops, wrong
;if (win.width(arg(2)) != word(winInfo, 3)) do
if (win.width(arg(2)) != &(xscreen)) do
map.delete(G_HorizMaxMap, arg(2))
endif
endif
winInfo = G_VertMaxMap[arg(2)]
if (winInfo != "") do
;if the height = stored height, then we havent vert sized,
;so we need to leave it in the map, but if we have different
;width, we have vert sized after vert max, so remove from map
;oops, wrong
;if (win.height(arg(2)) != word(winInfo, 4)) do
if (win.height(arg(2)) != &(yscreen)) do
map.delete(G_VertMaxMap, arg(2))
endif
endif
endif
As you can see, I am messing with sending the taskbar back in the
script and getting the problem when i then click on it, (thus causing
it to come to the front) so I expected to have troubles. This is just
part of some scripts to make w2k and wxp have the same taskbar
behavior as nt4 did. I planned to post it when it got working a
little better. I appreciate your interest in my problem, but in my
case, I think that I clearly fall under the heading of having been
warned and doing it anyway.
>
> I have tried the following without error as a hookwindowsevent
>
> win.debug("start")
> wait for 3000
> win.debug("end",arg(1))
>
> I could trigger multiple events during the wait and they all
> executed as expected.
>
> I would not be surprised if there is some kind of problem in some
> scripts with waits, but I don't know what they are.
>
> I will try some experiments with Sue's script at some point.
>
>
>
>
> >
> > Brian Cunningham
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/