AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AHK slows WinNT ?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
henkemail



Joined: 09 Mar 2005
Posts: 12

PostPosted: Wed Mar 09, 2005 1:43 am    Post subject: AHK slows WinNT ? Reply with quote

hi, first of all i am completely in love with AHK and my brain cannot stop working out new ways of automating my life...

now to my problem however..
i run AHK on my new XP machine at home and it works perfektly. but on my NT-machine at work it seems to freeze the mouse pointer (sometimes for several seconds) whenever i have clicked the minimize button on a window.

when i check the cpu usage it runs idle at 0% even with my ahk application running. but still the mousepointer freezing problem...

i should add that other than the above described problem i find the computer running pretty smoothly... but still this problem is a bit annoying.

(BTW, is it ok to use AHK within an orginization?)

cheers!
Wink
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Mar 09, 2005 1:53 am    Post subject: Reply with quote

Are you sure the problem lies in Autohotkey? I remember a topic similar to this a while ago, in which the problem actually turned out to be spyware.


henkemail wrote:
(BTW, is it ok to use AHK within an orginization?)


Of course! Unless your employer disapproves, AutoHotkey can be used anywhere.
Back to top
View user's profile Send private message
henkemail



Joined: 09 Mar 2005
Posts: 12

PostPosted: Wed Mar 09, 2005 2:22 am    Post subject: Reply with quote

thanks alot for your reply!

as soon as i exit the AHK app the mouse pointer no longer freezes like this. but still.. maybe i can try it on some collegues computer to see if the same thing occurs there..

Quote:
Of course! Unless your employer disapproves, AutoHotkey can be used anywhere.


wow great Razz
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Mar 09, 2005 2:29 am    Post subject: Reply with quote

Also, by "AHK app", you must mean a script you wrote, correct? Perhaps you could post the source for that script here so we can see if there's anything wrong with it?
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5068
Location: imaginationland

PostPosted: Wed Mar 09, 2005 2:30 am    Post subject: Re: AHK slows WinNT ? Reply with quote

henkemail wrote:
on my NT-machine at work it seems to freeze the mouse pointer (sometimes for several seconds) whenever i have clicked the minimize button on a window
Have you tried using "SetBatchLines, -1"
_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Mar 09, 2005 3:06 am    Post subject: Re: AHK slows WinNT ? Reply with quote

henkemail wrote:
on my NT-machine at work it seems to freeze the mouse pointer (sometimes for several seconds) whenever i have clicked the minimize button on a window
This could be caused by window animation temporarily maxing the CPU. When that happens (and there is a script with the mouse hook installed), the mouse cursor might jump around or "lag".

Setting the script's priority to High is likely to reduce this problem if it's related to the CPU being maxed. Try adding the following line near the top of the script:

Process, Priority, , High
(As Titan said, SetBatchLines -1 might help too)

Quote:
is it ok to use AHK within an orginization?
Certainly. It's GPL, so there aren't many restrictions.
Back to top
View user's profile Send private message Send e-mail
henkemail



Joined: 09 Mar 2005
Posts: 12

PostPosted: Wed Mar 09, 2005 1:20 pm    Post subject: problem solved! Reply with quote

hi everybody, and thanks alot for all your tips!!!

i removed everything from my script and added it back little by little....

..and i found out that these lines triggered the mouse-freezings:

Shift & WheelDown::AltTab
Shift & WheelUp::ShiftAltTab


So now the only question is: is there a better syntax for this...

thanx again!! Wink
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Mar 09, 2005 3:35 pm    Post subject: Reply with quote

That's strange, again. I've never encountered performance problems with the Alt-tab actions. You could try reproducing the hotkeys using regular keystrokes, and if it works it might be a bug in the Alt-tab actions.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Mar 09, 2005 4:32 pm    Post subject: Reply with quote

I don't think it's the alt-tab actions, but rather the fact that they're assigned to mouse hotkeys. Mouse hotkeys automatically cause the script to install the mouse hook. Since all cursor movements must pass through the hook, if the script doesn't get enough CPU time, the cursor will get stuck or lag behind your movements of the mouse.

Usually, setting priority to High resolves this:
Process, Priority, , High

If it doesn't help, turning off window animation might reduce the problem. If these things don't help, perhaps there is some other kind of problem at work here.
Back to top
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Mar 09, 2005 4:51 pm    Post subject: Reply with quote

You should have window animation turned off anyway. Confused
Back to top
View user's profile Send private message
henkemail



Joined: 09 Mar 2005
Posts: 12

PostPosted: Wed Mar 09, 2005 7:16 pm    Post subject: mouse hotkey bug ? Reply with quote

again thanx,

as a matter of fact when i add the WheelUp/Down:: hotkey to my script on my own XP machine the same kind of mouse delay/lag occurs in the exact same way, and it does not make a differens if I remove windelay or if I set process priority to high.

so i go with the theory that the mouse hotkey funktion actually is the problem here.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Mar 10, 2005 2:11 am    Post subject: Reply with quote

I can't explain or reproduce that (but I don't have window animation turned on). The only thing that comes to mind is turning off window animation.

It is normal to get mouse cursor lag sometimes, such as when a mouse-hotkey script launches an uncached document.

To anyone else who uses mouse hotkeys: Have you noticed this behavior?

Edit: I think this is a known issue for which there's no easy solution (other than turning off window animation in the OS). For details, see: http://www.autohotkey.com/forum/viewtopic.php?t=9013
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group