Jump to content
Sign in to follow this  
projektzero

BlockInput in win7

Recommended Posts

projektzero

OS: Win 7 (admin possible); autoitx: v3.3.0.0

Hi there,

I have a vbscript which connects via telnet to a server. Then some commands are send using SendKeys.

During this time I want to block mouse and keyboard input (for about 20 seconds), because the window focus may not be changed.

On XP this was no problem using autoitx3 and blockinput, but win7 doesn't accept blockinput. I read it's because of safety settings/lack of rights (...) in win7/vista, but I can't run a *.vbs as admin (also tried by runas in cmd). Is there no workaround or maybe an alternative approach to the problem?

Since I spend hours searching for a sollution but am still running in circles I would really appreciate some advise.

Greetz, Fred

Share this post


Link to post
Share on other sites
Richard Robertson

You don't run scripts as admin, you need to run the script interpreter as admin.

Share this post


Link to post
Share on other sites
projektzero

Thanks for your reply.

I followed your advice and was able to run the vbs as admin but still the blockinput part was ignored, so I guess inside the vbs I would have too call autoitx as admin too, but wasn't able too work this out.

Since the part I needed the Blockinput function for wasn't very complex I decided now to write it directly in autoit so I can run the compiled .exe as admin, which worked fine.

Greetz,

Fred

Share this post


Link to post
Share on other sites
Richard Robertson

Don't know what to tell you about in regards to the vbs file, but since it's working now, that's good enough.

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.