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 

Enable/ disable key with hotkey

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



Joined: 27 Jun 2006
Posts: 182

PostPosted: Tue Jul 01, 2008 10:22 pm    Post subject: Enable/ disable key with hotkey Reply with quote

Hello, i need to toggle the activity of shift with e. So when i press e, shift will be disabled until i press it again.

this is my idea, but it doesn't work:

Code:
e::goto, decide                 
                               
decide:                         
if toggle = 1                   
{                               
hotkey, shift, off             
toggle=0                       
}else{                         
hotkey, shift, on               
toggle=1                       
}                               
return                         
                               
off:                           
return                         
                               
on:                             
shift::shift                   
return


Any idea?
_________________
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 5887

PostPosted: Tue Jul 01, 2008 10:48 pm    Post subject: Reply with quote

Code:
e::
 Gui 99:+ToolWindow
 Gui,% "99:" ( S:=( S <> "Show" ) ? "Show" : "Destroy" ), x-1 y-1 +NoActivate, Dummy-AHK
Return

#IfWinExist, Dummy-AHK
 LShift::Return
 RShift::Return
#IfWinExist


Smile
_________________
SKAN - Suresh Kumar A N
Back to top
View user's profile Send private message
Clash



Joined: 27 Jun 2006
Posts: 182

PostPosted: Tue Jul 01, 2008 10:50 pm    Post subject: Reply with quote

Genius, thanks skan
_________________
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