My scripts seem to die when I Ctrl Alt Delete
I capture the enter key, but if I Ctrl Alt Delete and then escape, my hotkey doesn't respond.
Maybe my code is just broken...
My scripts seem to die when I Ctrl Alt Delete
Started by
AUrion
, Mar 09 2004 03:00 AM
6 replies to this topic
#1
-
Posted 09 March 2004 - 03:00 AM
I just tried a simple example on both Windows 98 and XP, and it seems to work even after pressing ctrl-alt-del:
enter::MsgBox, Enter was pressed.
Perhaps you can post the parts of your script(s) that you think might be the problem. Also, which OS are you using?
enter::MsgBox, Enter was pressed.
Perhaps you can post the parts of your script(s) that you think might be the problem. Also, which OS are you using?
#2
-
Posted 09 March 2004 - 01:03 PM
Ok - warning - the following is pretty ugly.
I can't code, and this is my first AutoHokey script.
I'm sure there is a much easier way.
Autotrim, off
Enter::
IfWinActive, Breeze Live
{
BlockInput, on
;Adelaide.
adeldate = %A_MDAY%
adelhour = %A_HOUR%
adelmin = %A_MIN%
if adelhour = 00
{
adeldate--
if adelmin < 30
{
;adelhour--.
adelhour += 23
adelmin += 30
}
else
{
adelmin -= 30
}
}
else
{
if adelmin < 30
{
adelhour--
adelmin += 30
}
else
{
adelmin -= 30
}
}
;Darwin.
dardate = %A_MDAY%
darhour = %A_HOUR%
darmin = %A_MIN%
IfLess, darhour, 2
{
dardate--
if darmin < 30
{
;EnvSub, darhour, 2.
darhour += 22
darmin += 30
}
else
{
;darhour++.
if darhour = 1
{
darhour --
}
else
{
darhour += 23
}
darmin -= 30
}
}
else
{
darhour--
if darmin < 30
{
darhour--
darmin += 30
}
else
{
darmin -= 30
}
}
Send, {home}%A_MDAY%`-%A_MON%`-%A_YEAR%`:{SPACE}%A_HOUR%%A_MIN%`EDT,{SPACE}(%adelhour%:%adelmin%CDT{SPACE}%darhour%:%darmin%CST)>{SPACE}{END}
Send, {NUMPADENTER}
Send, {Enter up}
BlockInput, off
exit
}
else
;MsgBox, else %Breeze%.
{
Send, {NUMPADENTER}
return
}
I can't code, and this is my first AutoHokey script.
I'm sure there is a much easier way.
Autotrim, off
Enter::
IfWinActive, Breeze Live
{
BlockInput, on
;Adelaide.
adeldate = %A_MDAY%
adelhour = %A_HOUR%
adelmin = %A_MIN%
if adelhour = 00
{
adeldate--
if adelmin < 30
{
;adelhour--.
adelhour += 23
adelmin += 30
}
else
{
adelmin -= 30
}
}
else
{
if adelmin < 30
{
adelhour--
adelmin += 30
}
else
{
adelmin -= 30
}
}
;Darwin.
dardate = %A_MDAY%
darhour = %A_HOUR%
darmin = %A_MIN%
IfLess, darhour, 2
{
dardate--
if darmin < 30
{
;EnvSub, darhour, 2.
darhour += 22
darmin += 30
}
else
{
;darhour++.
if darhour = 1
{
darhour --
}
else
{
darhour += 23
}
darmin -= 30
}
}
else
{
darhour--
if darmin < 30
{
darhour--
darmin += 30
}
else
{
darmin -= 30
}
}
Send, {home}%A_MDAY%`-%A_MON%`-%A_YEAR%`:{SPACE}%A_HOUR%%A_MIN%`EDT,{SPACE}(%adelhour%:%adelmin%CDT{SPACE}%darhour%:%darmin%CST)>{SPACE}{END}
Send, {NUMPADENTER}
Send, {Enter up}
BlockInput, off
exit
}
else
;MsgBox, else %Breeze%.
{
Send, {NUMPADENTER}
return
}
#3
-
Posted 09 March 2004 - 09:19 PM
I forgot to say that I'm using Windows 2000 Professional
#4
-
Posted 09 March 2004 - 09:20 PM
I think I might know the problem. After pressing ctrl-alt-del and then pressing ESC (or coming back to the system), try pressing and releasing the same Ctrl and Alt keys you origially pressed. That should reset them.
Then see if your hotkey works again. If it does, I think I know why: it's the same problem Jack was having with Win-L (to lock the workstation): the hook thinks the Ctrl and Alt keys are still down.
Also, if you get time, maybe you could test the Win-L hotkey to see if it locks your workstation (this will force you to have to log back in again). I'm wondering if Win-L works the same on 2k as it does on XP.
Please let me know your findings and I will try to adjust the program to compensate.
Thanks,
Chris
Then see if your hotkey works again. If it does, I think I know why: it's the same problem Jack was having with Win-L (to lock the workstation): the hook thinks the Ctrl and Alt keys are still down.
Also, if you get time, maybe you could test the Win-L hotkey to see if it locks your workstation (this will force you to have to log back in again). I'm wondering if Win-L works the same on 2k as it does on XP.
Please let me know your findings and I will try to adjust the program to compensate.
Thanks,
Chris
#5
-
Posted 09 March 2004 - 10:11 PM
Just tested and if I press the alt key once I've ctrl-alt-deleted it resets and works fine.
Win+L does nothing on this machine
Win+L does nothing on this machine
#6
-
Posted 10 March 2004 - 01:02 AM
That's good info, thanks. This should be fixed in the next release.
Edit: Actually, if you could do one more thing for me, it will help me be certain of what's going on:
With your script running:
Press Ctrl-Alt-Del.
Press Esc to dismiss the dialog.
Double click the tray icon to open the main window.
Choose the menu "View->Key History"
Right-click the window's contents and choose Select All.
Press Ctrl-C to copy it.
Paste the entire thing here (but make sure it doesn't contain any sensitive info such as passwords) or just send it directly to [email protected] (this might be better since it probably won't be of interest to anyone else).
That should allow me to see which keys (if any) of the ctrl-alt-delete sequence are being handled in a peculiar way by the OS.
Thanks for your help.
Edit: Actually, if you could do one more thing for me, it will help me be certain of what's going on:
With your script running:
Press Ctrl-Alt-Del.
Press Esc to dismiss the dialog.
Double click the tray icon to open the main window.
Choose the menu "View->Key History"
Right-click the window's contents and choose Select All.
Press Ctrl-C to copy it.
Paste the entire thing here (but make sure it doesn't contain any sensitive info such as passwords) or just send it directly to [email protected] (this might be better since it probably won't be of interest to anyone else).
That should allow me to see which keys (if any) of the ctrl-alt-delete sequence are being handled in a peculiar way by the OS.
Thanks for your help.
#7
-
Posted 10 March 2004 - 01:30 AM