Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

My scripts seem to die when I Ctrl Alt Delete


  • Please log in to reply
6 replies to this topic
AUrion
  • Guests
  • Last active:
  • Joined: --
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...

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
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?

AUrion
  • Guests
  • Last active:
  • Joined: --
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
}

AUrion
  • Guests
  • Last active:
  • Joined: --
I forgot to say that I'm using Windows 2000 Professional

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
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

  • Guests
  • Last active:
  • Joined: --
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

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
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.