AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can you use Ctrl+Alt+Delete as a hotkey?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
andrei901



Joined: 20 Jan 2008
Posts: 24

PostPosted: Sun Jun 29, 2008 4:20 am    Post subject: Can you use Ctrl+Alt+Delete as a hotkey? Reply with quote

I am trying to write a script which will let programs run, but with blockinput and the screen black. I had a code which went something along the lines of: (I deleted original)

Code:

^a::
BlockInput, On
SendMessage 0x112, 0xF170, 1,,Program Manager
^!{delete}::Shutdown, 4   ; ?
BlockInput, Off
Exit


so basically, I wanted the computer to kill all programs and shut down right away. However, the control-alt-delete hotkey didn't work, so i tried just control, with this code:

Code:

^a::
BlockInput, On
SendMessage 0x112, 0xF170, 1,,Program Manager
^::Shutdown, 4   ; ?
BlockInput, Off
Exit


however, this did not work either. this leads me to believe that i wrote the command wrong, so how would you write that kind of code?

currently, i am using this code:

Code:

^a::
BlockInput, On
Gui, +AlwaysOnTop +LastFound +Owner -Caption
Gui, Color, Black
Gui, Show, x0 y0 Maximize
sleep, 18000000
BlockInput, Off
Exit


Which works, because the screen stays black until you somehow kill the script. How can I make a script which will basically turn the screen black and stop anyone from being able to recover the data in question without restarting the computer and finding the folder in which it is?


total: 3 questions:

Can Ctrl-Alt-Del be used as a hotkey?

How can I write a command that will terminate a script when a button is pressed at a point in the script?

Can someone help me make my script unterminateable by blocking access to task manager?

-andrei901, your average wannabe who uses autohotkey in bursts.
Back to top
View user's profile Send private message AIM Address
John W



Joined: 09 Apr 2007
Posts: 169

PostPosted: Sun Jun 29, 2008 3:26 pm    Post subject: Reply with quote

1. Nope.
2.
Code:
esc::
exitapp
return

(Escape exits script)
3. Search the forum.
_________________
John
Inactive - Until AutoHotkey is available for Linux.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SKAN



Joined: 26 Dec 2005
Posts: 5887

PostPosted: Sun Jun 29, 2008 3:38 pm    Post subject: Re: Can you use Ctrl+Alt+Delete as a hotkey? Reply with quote

andrei901 wrote:
Can Ctrl-Alt-Del be used as a hotkey?


Yes!

Code:
^!Del::MsgBox


But you cannot supress its native function - That is, the Task Manager

Smile
_________________
SKAN - Suresh Kumar A N
Back to top
View user's profile Send private message
andrei901



Joined: 20 Jan 2008
Posts: 24

PostPosted: Sun Jun 29, 2008 9:24 pm    Post subject: Reply with quote

does Ctrl-Alt-Del pause the script? if it doesn't, you could have it be something like:

Code:

^!Del::
Sleep, 5
Send, {tab}
Sleep, 5
Send, {tab}
Sleep, 5
Send, {tab}
Sleep, 5
Send, {tab}
Sleep, 5
Send, {tab}
Sleep, 5
Send, {enter}
return


this would tab to the "cancel" button and press it.

the sleep 5 commands in the script are for compatibility with slower computers, or lag, because i have had my computer lag and not register some of the tabs.

EDIT: didn't work for me, anyone else?
_________________
-andrei901, your local wannabe AHK expert
Back to top
View user's profile Send private message AIM Address
yoyowazzup
Guest





PostPosted: Mon Jun 30, 2008 3:38 am    Post subject: Reply with quote

what didnt work? or what worked exactly? whole script?
alt+F4 closes active window including task manager, which preferbaly is a better solution to closing the window.
or just use
Code:

WinWaitActive, TaskManager ;; waits for task manager win to be active
Winclose ;; then closes
Back to top
andrei901



Joined: 20 Jan 2008
Posts: 24

PostPosted: Thu Jul 03, 2008 3:27 am    Post subject: Reply with quote

thank you. missed that.

Code:
WinWait Windows Task Manager
WinClose


works, no need for WinWaitActive command, which might be circumvented by starting task manager is the background and pressing "end process" button on the script, since it would end the script first.
_________________
-andrei901, your local wannabe AHK expert
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group