brett Posted May 3, 2004 Share Posted May 3, 2004 (edited) I've been working on this very simple program, but can't get a few things. How can i disable the Win Key? I've disable everything but that so far, so that u can lock the computer. Take a look at the code. The code works fine on my comp but some others can't get their screen back so be careful Thanks, Brett expandcollapse popup$AltShift = "+!" $Hide = "a" $HideCombo = $AltShift & $hide Go() Func Go() Global $Paused HotKeySet("+!z", "done") HotKeySet( $HideCombo, "Hide") HotKeySet("+!q", "Terminate") HotKeySet("+!s", "Setup") while 1 wend Hide() EndFunc Func Hide() WinSetTitle ( "", "start", "taskbar" ) ControlHide ( "taskbar", "", "" ) ControlHide ( "Program Manager", "", "" ) WinMinimizeAll() While 1 WinSetTitle ( "", "Processes", "Windows Task manager" ) WinKill ( "Windows Task manager") HotKeySet("!{TAB}","doo") HotKeySet("!{TAB}","doo") Wend Pause() EndFunc Func Pause() Global $Paused HotKeySet("+!d", "Terminate");Shift-Alt-a $Paused = NOT $Paused While $Paused sleep(100) ;ToolTip('Script is "Paused"',0,0) WEnd EndFunc Func Terminate() WinMinimizeAllUndo() ControlShow ( "taskbar", "", "" ) ControlShow ( "Program Manager", "", "" ) sleep ( 5000 ) Exit 0 EndFunc Func doo() EndFunc Func done() Exit 0 EndFunc Func Setup() Do $hide=InputBox("Key Combo To Hide", "What letter or number combination do you want to hit to hide windows?, One Letter only", "A", "", -1, -1, 0, 0) until Stringlen($hide)=1 $HideCombo = $AltShift & $hide Go() Endfunc Edited May 3, 2004 by brett -Brett Link to comment Share on other sites More sharing options...
Nutster Posted May 5, 2004 Share Posted May 5, 2004 Can you actually trap Alt-Tab? I thought it did not make it to an application. The windows key is in the same boat. Keys that are trapped by Windows can not be trapped by another application. I like the idea of hiding the Program Manager. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... 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