Amen Posted September 20, 2005 Share Posted September 20, 2005 Hi.Does anybody knows how to disable the win keys and the alt+tab. Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
Amen Posted September 20, 2005 Author Share Posted September 20, 2005 I also found this if helps you.I can't convert it to autoit Windows NT 4.0 Service Pack 3 and later Windows 2000 Applications can disable ALT+TAB or CTRL+ESC by installing a low-level keyboard hook. A low-level keyboard hook is installed by calling SetWindowsHookEx. LRESULT CALLBACK LowLevelKeyboardProc (INT nCode, WPARAM wParam, LPARAM lParam) { KBDLLHOOKSTRUCT *pkbhs = (KBDLLHOOKSTRUCT *) lParam; BOOL bControlKeyDown = 0; switch (nCode) { case HC_ACTION: { bControlKeyDown = GetAsyncKeyState (VK_CONTROL) >> ((sizeof(SHORT) * 8) - 1); // Disable CTRL+ESC if (pkbhs->vkCode == VK_ESCAPE && bControlKeyDown) return 1; // Disable ATL+TAB if (pkbhs->vkCode == VK_TAB && pkbhs->flags & LLKHF_ALTDOWN) return 1; // Disable ALT+ESC if (pkbhs->vkCode == VK_ESCAPE && pkbhs->flags & LLKHF_ALTDOWN) return 1; // Disable the WINDOWS key if (pkbhs->vkCode == VK_LWIN || pkbhs->vkCode == VK_RWIN) return 1; break; } default: break; } return CallNextHookEx (hHook, nCode, wParam, lParam); } Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
seandisanti Posted September 20, 2005 Share Posted September 20, 2005 Hi.Does anybody knows how to disable the win keys and the alt+tab.try this... it sets a hotkey to alt tab, effectively killing it's normal functionality. for windows keys, as soon as one is pressed, it releases the key and sends an escape. there are i'm sure better ways to do this with dllcalls, but this just seemed like the easy way out.#include<ispressed.au3> HotKeySet("!{TAB}","BLOCKED") while 1 if _IsPressed("5B") OR _IsPressed("5c") Then send("{LWIN up}{RWIN up}{ESC}") EndIf SLEEP(100) WEnd Func blocked() EndFunc Link to comment Share on other sites More sharing options...
Amen Posted September 20, 2005 Author Share Posted September 20, 2005 (edited) yea with alt tab we are ok with this script.The problem is with the Win keys. My script runs from a remote computer so "send " commands do not working. But even i run this from local windows catches first that win key is pressed. I need script Prevent user switching Programs or go out to desktop while he is in a prog i monitor. Edited September 20, 2005 by Amen Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
seandisanti Posted September 20, 2005 Share Posted September 20, 2005 My script runs from a remote computer so "send " commands do not working.not sure how you can block or redirect keystrokes on a machine from another machine... Link to comment Share on other sites More sharing options...
LxP Posted September 20, 2005 Share Posted September 20, 2005 I need script Prevent user switching Programs or go out to desktop while he is in a prog i monitor. local $win = "Name of window" while (1) winActivate($win) sleep(100) wEnd Link to comment Share on other sites More sharing options...
Amen Posted September 21, 2005 Author Share Posted September 21, 2005 (edited) Yea that's it.Hit exactly the target.Thanks! I wanted user not to copy the game while cd-keys are loaded. before you post i've thought this: While ProcessExists("war3.exe") If WinExists(@comspec) then Action1() If WinExists("Copying...") then Action2() Sleep(100) WEnd exit Func Action1() WinKill(@ComSpec) EndFunc Func Action2() WinKill("Copying...") EndFunc but yours is better solution.More safer.Thanks again Edited September 21, 2005 by Amen Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- 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