 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Jiashern
Joined: 09 Aug 2008 Posts: 26
|
Posted: Wed Aug 13, 2008 4:59 pm Post subject: How do i shut off Autohotkey when i am typing? |
|
|
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 |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Wed Aug 13, 2008 5:05 pm Post subject: |
|
|
| 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 |
|
 |
Jiashern1 Guest
|
Posted: Thu Aug 14, 2008 6:33 am Post subject: |
|
|
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....
how!!? |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Thu Aug 14, 2008 12:45 pm Post subject: |
|
|
Look up "Hotkey" in the helpfile. You can use:
| Code: | Hotkey, 8, on
Hotkey, 8, off |
|
|
| Back to top |
|
 |
Razlin
Joined: 05 Nov 2007 Posts: 434 Location: canada
|
Posted: Thu Aug 14, 2008 1:44 pm Post subject: |
|
|
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 |
|
 |
jk7800
Joined: 06 Jan 2008 Posts: 40 Location: Gdi+ v1.1
|
Posted: Thu Aug 14, 2008 3:30 pm Post subject: |
|
|
| 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....
how!!? |
Try with "Winspector Spy". |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|