Jump to content

How to exit script, keys and mouse disabled


Recommended Posts

Hi,

I was thinking of implenting my script so that a user cannot interfere by using the mouse or keyboard until it finishes.

However i am hesitant to use this as i have found that my script doesnt work sometimes and i need to right click the icon and exit it manually.

If i disable keyboard and mouse functionality, is there a way to manually exit the script? Or would the only way to exit be to reset the machine?

Thanks in advance

Link to comment
Share on other sites

Is any script "Send" functionality blocked?

Not unless you are using Windows 98, ME, but the rest should be fine. See also: BlockInput in the helpfile for more information regarding the effect BlockInput(1) has on systems.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

Guest Guest_Program

When i use the command

BlockInput(1)

at the beginning of a script, i expect that when the script is run, a user cannot actively click on the desktop with the mouse or the keyboard doesnt work until the script exits.

However when i run the script i can click the mouse on the desktop just as though the script wasnt running...!

Is there anything else that must be added to the script apart from the above?

:D

Link to comment
Share on other sites

Is there anything else that must be added to the script apart from the above?

No, that is the command to use. Please note the following table (coppied from the helpfile.) If your system matches "no effect" then the BlockInput call will do no good until you change your OS.

Windows 95 - No effect.

Windows 98/Me - User input is blocked but AutoIt is also unable to simulate input.

Windows NT 4 (Without ServicePack 6) - No effect.

Windows NT 4 (With ServicePack 6) - User input is blocked and AutoIt can simulate most input.

Windows 2000/XP - User input is blocked and AutoIt can simulate most input.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

Guest Guest_Program

Yeah sorry,

that was my stupid fault, i was testing my script on a remote machine where i was using a remote desktop utility (winvnc) that allowed me to utilize the remote mouse. However when i physically went to the machine all functionality was disabled!

Ta :D

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...