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 

Runing a simple code disables my main 3 key

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





PostPosted: Tue Apr 22, 2008 1:12 am    Post subject: Runing a simple code disables my main 3 key Reply with quote

Hello friends,

I'm using AutoHotkey v1.0.47.06, and I wrote the next script to be able to use some of the additional keys in my keyboard. I used the template supplied when you create a new AutoHotkey file (New >> AutoHotKey script).

ExtraKeys.ahk
Code:

#NoEnv
#InstallKeybdHook
SendMode Input
SetWorkingDir %A_ScriptDir%

SC123::AltTabMenu
Up::ShiftAltTab
Down::AltTab

$Sleep::Send, {Sleep}
Sleep & D::Shutdown, 9
Sleep & L::Shutdown, 0
Sleep & H::DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0)
Sleep & R::Shutdown, 2
Sleep & S::DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
# & F4::Shutdown, 9

SC114::Run, excel
SC113::Run, winword

; MyC+* = Open one of this folders with Explorer
Launch_App1::Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d}
Launch_App1 & D::Run ::{450d8fba-ad25-11d0-98a8-0800361b1103}
Launch_App1 & E::Run, C:\Emu
Launch_App1 & G::Run, C:\Games
Launch_App1 & T::Run, C:\Tamashii's Folder
Launch_App1 & Z::Run, C:\Downloads

; MyC+1 = Eject or close the CD Tray
Launch_App1 & 1::
DriveGet, unidad_eject, StatusCD, E:
If unidad_eject = open
    Drive, Eject, E:, 1
Else
    Drive, Eject, E:
return


However when I run it, the number '3' key in my main keyboard block (not the numeric keypad) (Virtual Key 33 Scan Code 004) doesn't work anymore.

Some remarks: I installed the Keyboard hook to be able to see if my keyboard was damaged, however, the key is shown perfectly (when I press it) in the "Key history and script info" panel.
Also, in the "Lines more recently executed" panel, there's no script line shown running when I press the number '3' key.

Maybe it's superfluous to append that when I close the running script, the number '3' key works again perfectly. Running any other scripts (like NiftyWindows) with or without my own script, doesn't disables my number '3' key.

Any help or insights on this problem would be gratefully thanked.

Thanks in advance,

Juan Pablo Garcia
A.K.A. Tamashii
A long time AutoHotkey user (But recently I'm back)
Back to top
orbik



Joined: 09 Apr 2008
Posts: 25
Location: Espoo, Finland

PostPosted: Tue Apr 22, 2008 5:11 am    Post subject: Reply with quote

Quote:
Code:
# & F4::Shutdown, 9

Did you mean:
Code:
LWin & F4::Shutdown, 9

Or perhaps:
Code:
~LWin & F4::Shutdown, 9
Back to top
View user's profile Send private message
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