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.

link|improve this question

68% accept rate
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 – roseck Aug 29 '11 at 13:51
feedback

1 Answer

up vote 1 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

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

Your Answer

 
or
required, but never shown

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