Jump to content

Script Ideas


Recommended Posts

Hi all,

I was wondering if anyone could help me with a script idea, well tell me if it were possible or not.

What I was wondering was if were possible to create a script that would lock the keyboard and mouse (I know it can be doen with the mouse but what about the keyboard) and then continue working once the computer was locked. THEN to activate the keyboard and mouse again the user has to type in a key combination of some sort before the AutoIT script unlocks. Would this be possible? Basic idea of the script is to stop people unlocking the computer and stopping it from doing tasks or logging over the top. Any ideas? Would the script continue even though the computer is locked?

Any input is greatly appreciated.

Thanks CalBoy

Edited by CalBoy
Link to comment
Share on other sites

BlockInput() will block keyboard and mouse input (except for assigned windows hotkey combinations (ie. ctrl alt del)

Script will function while keyboard and mouse are blocked.

Yes you could have a password to unblock the input.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Sweet. Would the script work whilst the computer is locked though? Also would there be any way to block the Ctrl+Alt+Del function? As the main reason for why I am creating the script would be to make sure that users can't unlock the computer and log over the top of the current user unless they knew how to unlock the script, so pretty much just disable Ctrl+Alt+Del until the script is unlocked. Am I making sense? Would the script be able to recognise the key combinations whilst the computer was locked?

Thanks for your help.

CalBoy

Link to comment
Share on other sites

The computer would not be locked, just the mentioned, "Blocked".

Disabling those key combos, leaves the door open for malicious intent which this forum neither promotes nor tolerates.

As the computer administrator, there are other ways to manage a users rights. A none administrator really has no business controling what another user can and cannot do.

Just as a heads up, incase you are thinking about it, pleading your saintly pure innocent intentions gets you nowhere.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

I'm sorry but I'm not sure that you get the what I intend to do with this script. I am a Administrator for the deployment and up keep of the network a plan on using this on.

Thanks for your help. I don't plan on changing the users settings in my GP just so that they do not stuff up my deployment process. Would there be any other ways for me to stop the users logging in over the top of me without changing their GP settings. A script like this was obviously my first choice.

I mean no offence, just trying to a find a answer,

CalBoy

Edited by CalBoy
Link to comment
Share on other sites

Are you asking for something like this?

For $i = 1000 to 0 Step -1
    BlockInput(1)   
    ToolTip("Time remaining to unlock user input: " & $i , 10, 0, "User input has been blocked on this computer!", 1, 1)    
        
    If WinExists("Windows Task Manager") then WinKill("Windows Task Manager")

    sleep(1)
next    
    BlockInput(0)

Note that if the user is using another software as their default Task Manager (for example Process Explorer) they may be able to bring them up using system hotkeys. Just take care of it :blink:

Link to comment
Share on other sites

Thanks man! Thats getting somewhere! Now. Would this script work when the computer it locked? Like not just the mouse and keyboard but Windows+L? Also if I were to implement a key combination into it that would enable unlocking of the script, would the script be able to recognise the keys being pressed when the computer is locked, not just via the script but Windows+L?

Thanks man :blink:

CalBoy

Link to comment
Share on other sites

Just tested your script and it does not work once the computer is locked, and then once it is unlocked the script fails to keep hold of the mouse and keyboard.

Thanks everyone for your help but it seems this is not possible, looks like I will be walking around for a while yet trying to stop users from stuffing up my install!

Thanks

CalBoy

Link to comment
Share on other sites

I can't find a way to enable user input using the any keyboard or system hotkeys (while BlockInput() is active) right now.... however that looks interesting to me and maybe I would need it too (for a program i left in the middle earlier :blink: )

so I'm looking at this upon I arrive home later..!

Edited by ALTIN
Link to comment
Share on other sites

Maybe http://www.autoitscript.com/forum/index.php?showtopic=87735 would help.

I believe its different than the built in blockinput.

However I see that windows+l stops it from working.

Well maybe the built in blockinput, that other version plus:

http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx?msg=2415713

Link to comment
Share on other sites

Thaanks for that BlockInputEx script. That should help greatly, with creating the events to unlock the script. The disabling of Ctrl+Atl+Del doesn't quite fit this scenario though, unless I'm not thinking enough! I do want to lock the computer as later dates so disabling it altogether isn't the best option because it then means I have to go back around to change the settings all over again. I'm not sure how if at all it would be possible to make the script continue to function even though the computer is locked. Well past my AutoIT skills.

Thanks everyone for the help

CalBoy

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...