Jump to content
Sign in to follow this  
Rob A

Infinate Loop casuse smemory issues

Recommended Posts

Rob A

Hi Peeps,

If WinExists("Check Point VPN-1 SecuRemote Connection") Then

WinActivate("Check Point VPN-1 SecuRemote Connection", "")




I am using the above script to check if a window is open and if it is then it sends the "c" key to click Connect button, this all works fine but the only issue is that after a few days the process starts to takes up 50% cpu cycles.

I need some advise please :)



Share this post

Link to post
Share on other sites

The CPU usage is probably so high, because the function operate a couple of 100 times per second.

Try putting


before the "Wend" statement. That way, the loop only checks on the window 10 times per second, but that should be enough, i guess...

Share this post

Link to post
Share on other sites
Rob A

I had the same problem with a script doing what you are describing. The sleep statement did the trick nicely in correcting it.

Thanks you two, so far so good it appears to be working perfectly now :)

Bye 4 now


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.