Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Scripts and Functions (v2) • Re: [alpha] WinEvent - easily detect window open, close, move, and more

$
0
0
Hello! Thanks for this. I stumbled upon this today and already put it to use a few different ways, and just realized how new it is!

I will have to experiment what exactly is going on, but I've found a tiny bug. My script is 2200 lines, so I won't paste it all. But essentially I am doing the following:

F4::
{
MouseMove 1000,500
Send "^{Home}"
Send "{Click , , Right}"
Send "f"
Send "{Tab}+{Tab}"
Send "****{Enter}"
}

And this works great if I don't have the WinEvent.ahk library loaded and running something like WinEvent.Show(NotepadCreated, "ahk_class Notepad ahk_exe notepad.exe")

When I add that line in, then it starts to slow down significantly such that what normally was imperceptible now takes up to 2 seconds.
What makes this stranger is that if I have Window Spy open, it is once again imperceptible (until I close Window Spy)..

I'll say, I tried putting the above code into it's own ahk file and running it, and it didn't go slow. So I'm clearly causing the problem with all my code, but it's still strange how Window Spy causes a difference in behavior simply by being open/closed.
Thoughts? Thanks!

Statistics: Posted by jschwalbe — Today, 15:31



Viewing all articles
Browse latest Browse all 579

Trending Articles