Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like AppsKey + Delete to simulate LCtrl+LAlt+Del, and I thought the following script would do it, but it doesn't:

AppsKey & Delete::  
SendInput {LAlt down}{LCtrl down}{Delete}{LAlt up}{LCtrl up} 
MsgBox "You pressed AppsKey & Delete"
return

Any thoughts why?

Note 1:: The MsgBox command above works though and I get a window.

Note 2:: I tested this on Windows 7 64bit and Windows XP 32bit with no success.

share|improve this question
    
Try removing the spaces between adjacent braces. Also, can you verify that the script is actually executed when you hit AppsKey + Delete? (Put a messagebox in there to check) –  Breakthrough Aug 29 '11 at 13:24
    
Thanks @Breakthrough, I just updated the post. The MsgBox statement works, but AutoHotkey doesn't seem to send LCtrl+LAlt+Del –  user815423426 Aug 29 '11 at 13:51
add comment

1 Answer

up vote 2 down vote accepted

Read the SendInput and Send help document, in some part says the following:

the operating system does not allow simulation of the CTRL-ALT-DELETE combination, doing something like Send ^!{Delete} will have no effect

I think you need to find an alternative way to block the system, maybe using some Win API function call.

Link of the fr doc: http://autohotkey.free.fr/docs/commands/Send.htm

Link of the us doc: http://www.autohotkey.com/docs/commands/Send.htm

share|improve this answer
    
Thanks @voodoomsr, do you know by any chance what ^!means in Send ^!{Delete}? –  user815423426 Aug 29 '11 at 15:01
1  
Yes, !=Alt and ^=Ctrl –  mjsr Aug 29 '11 at 15:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.