pikablue Posted July 5, 2009 Share Posted July 5, 2009 (edited) I'm making a autoit software to stop my lil cousin from playing around on my idled computer, it would automatically shut down when she click the mouse left button. or if anyone have any good idea. why doesn't this work? If _IsPressed("01") shutdown(6) Endif I have autoit running 24/7 i don't want her click the mouse or move the mouse or press any keys i try blockinput() doesn't seem to work for me, i disabled UAC Too i'm vista Edited July 5, 2009 by pikablue Link to comment Share on other sites More sharing options...
diferent Posted July 5, 2009 Share Posted July 5, 2009 I'm making a autoit software to stop my lil cousin from playing around on my idled computer, it would automatically shut down when she click the mouse left button. or if anyone have any good idea. why doesn't this work? If _IsPressed("01") shutdown(6) Endif I have autoit running 24/7 i don't want her click the mouse or move the mouse or press any keys i try blockinput() doesn't seem to work for me, i disabled UAC Too i'm vistaHi! Try this. #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 ;IF _IsPressed("02", $dll) Then shutdown(6) IF _IsPressed("02", $dll) Then MsgBox(16,"dbg","Mouse click detected") WEnd DllClose($dll) Link to comment Share on other sites More sharing options...
Travis Posted July 5, 2009 Share Posted July 5, 2009 (edited) #include <Misc.au3> While 1 If _IsPressed("01") then Blockinput(1) Shutdown(5) ;Force = 4, Shutdown = 1, your option (6) means force reboot. You wanted shutdown right. Endif Wend I would recommend reading up on your autoit it. EDIT: I apologize for the incorrect code, but I couldn't update fast as I tested out my script and it shut off my computer. Edited July 5, 2009 by Travis Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 5, 2009 Share Posted July 5, 2009 I would recommend you just lock the computer when you leave it. You can set the screen saver to go back to the login screen so she won't be able to do anything. That's a much cleaner solution. Link to comment Share on other sites More sharing options...
pikablue Posted July 5, 2009 Author Share Posted July 5, 2009 Thanks for all the advice, I just tried the DisableinPut method, i think that would be enough. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now