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 

How do i shut off Autohotkey when i am typing?

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



Joined: 09 Aug 2008
Posts: 26

PostPosted: Wed Aug 13, 2008 4:59 pm    Post subject: How do i shut off Autohotkey when i am typing? Reply with quote

The case is like this:
I am using photoshop and intended to assign single key to an action
for example: 8:send {m}

however, when i do this, what i type out will run, mother--->8other

Is there any function that can stop the script when the user is typing?
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Wed Aug 13, 2008 5:05 pm    Post subject: Reply with quote

Code:
#IfWinExist, Photoshop
m::8


Should only allow the "m" hotkey to work while in Photoshop, and not in any other window.
Back to top
View user's profile Send private message MSN Messenger
Jiashern1
Guest





PostPosted: Thu Aug 14, 2008 6:33 am    Post subject: Reply with quote

Thanks Sivvy, i have tried it out, it has solved the problem when i am typing in the other window, but..... What if i want to type text in photoshop?

I have tried to use Windowspy to see if there any chance to find ahk_class of text tool in photoshop, but it shows the ahk_class of photoshop....

Shocked how!!?
Back to top
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Thu Aug 14, 2008 12:45 pm    Post subject: Reply with quote

Look up "Hotkey" in the helpfile. You can use:

Code:
Hotkey, 8, on
Hotkey, 8, off
Back to top
View user's profile Send private message MSN Messenger
Razlin



Joined: 05 Nov 2007
Posts: 434
Location: canada

PostPosted: Thu Aug 14, 2008 1:44 pm    Post subject: Reply with quote

As others have mentionned you can disable your hotkeys and enable them later

Example of something I use

Code:

;Autoexec section
menu, Tray, icon, c:\myU.ico

; make sure scrolllock is "off"
 if (GetKeyState("scrolllock" , "T"]))
 {
   ;turn if off if it isnt
   SetScrollLockState , Off
 }
   hotkey , F4, Off
   hotkey , F1, Off
   hotkey , lwin, Off
   hotkey , Pause, Off
   hotkey , RButton, Off
   hotkey , ^up, Off
   hotkey , ^down, Off
   hotkey , ^enter, Off
;...
;...
return

~scrolllock::
   GetKeystate , scrollstate, scrolllock, T
   hotkey , F4, toggle
   hotkey , F1, toggle
   hotkey , lwin, toggle
   hotkey , Pause, toggle
   hotkey , RButton, toggle
   hotkey , ^up, toggle
   hotkey , ^down, toggle
   hotkey , ^enter, toggle
;...
;...
   menu , Tray, icon, c:\my%scrollState%.ico
return


When I hit scrolllock it activates all my hotkeys and changes my icon in my taskbar

I have 2 icons one green for "active" and one yellow for disabled.
call your icons myU.ico and myD.ico
U for Up and D for down...
Anyhow you can change it to your likings.. thats what I use anyhow.
_________________
-=Raz=-
Back to top
View user's profile Send private message
jk7800



Joined: 06 Jan 2008
Posts: 40
Location: Gdi+ v1.1

PostPosted: Thu Aug 14, 2008 3:30 pm    Post subject: Reply with quote

Jiashern1 wrote:
I have tried to use Windowspy to see if there any chance to find ahk_class of text tool in photoshop, but it shows the ahk_class of photoshop....

Shocked how!!?


Try with "Winspector Spy".
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