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 

` (Grave) Key

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



Joined: 19 Nov 2009
Posts: 8

PostPosted: Fri Nov 20, 2009 10:39 am    Post subject: ` (Grave) Key Reply with quote

I've got the ` key bound to control my pet in World of Warcraft, and I'm using AHK to 2box, but AHK doesn't seem to recognize this keystroke properly. Here is the snippet of script I have for its use.

Code:

WinGet, wowid, List, World of Warcraft

!`::
KeyWait !
KeyWait `,
IfWinActive, World of Warcraft
{
  ControlSend,, {`}, ahk_id %wowid2%
  Return
}

!^`::
KeyWait !
KeyWait ^
KeyWait `,
IfWinActive, World of Warcraft
{
  ControlSend,, ^{`}, ahk_id %wowid2%
  Return
}

!+`::
KeyWait !
KeyWait +
KeyWait `,
IfWinActive, World of Warcraft
{
  ControlSend,, +{`}, ahk_id %wowid2%
  Return
}


The help pages I've seen for special characters and the like make no mention of the grave key. Any help would be appreciated, thanks.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Fri Nov 20, 2009 10:44 am    Post subject: Reply with quote

#EscapeChar wrote:
`` ` (literal accent; i.e. two consecutive escape characters result in a single literal character)

_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
Emeraldas



Joined: 19 Nov 2009
Posts: 8

PostPosted: Fri Nov 20, 2009 11:18 am    Post subject: Invalid hotkey Reply with quote

`` results in an invalid hotkey error.
Back to top
View user's profile Send private message
:?:
Guest





PostPosted: Fri Nov 20, 2009 11:22 am    Post subject: Reply with quote

R u sure u mean "`" and not "´"?!
Cause if u mean "`" u'll have to press Shift aswell...
Back to top
HotKeyIt



Joined: 18 Jun 2008
Posts: 4652
Location: AHK Forum

PostPosted: Fri Nov 20, 2009 11:24 am    Post subject: Reply with quote

This works for me (German keybord so I need to press Shift as well):
Code:
`::
MsgBox
ExitApp
^`::
MsgBox ctrl
ExitApp
!`::
MsgBox alt
ExitApp

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
a_h_k



Joined: 02 Feb 2008
Posts: 626

PostPosted: Fri Nov 20, 2009 1:58 pm    Post subject: Re: ` (Grave) Key Reply with quote

Are you sure it's not just this part that's not working?
ControlSend,, {`}, ahk_id %wowid2%

I see no mention of "{`}" on the Send page .. maybe you should try
ControlSend,, ``, ahk_id %wowid2%
Back to top
View user's profile Send private message Visit poster's website
Emeraldas



Joined: 19 Nov 2009
Posts: 8

PostPosted: Fri Nov 20, 2009 2:37 pm    Post subject: Reply with quote

Okay, after playing around for a bit, the `` in the send is working.

However, when I try to do it with the Shift or Control modifiers it's not working either way. If it's not one thing, it's another, right?
Back to top
View user's profile Send private message
a_h_k



Joined: 02 Feb 2008
Posts: 626

PostPosted: Sat Nov 21, 2009 8:59 am    Post subject: Re: ` (Grave) Key Reply with quote

So this doesn't work?
(I put the Returns where they should be)
Code:
WinGet, wowid, List, World of Warcraft

!`::
KeyWait !
KeyWait `,
IfWinActive, World of Warcraft
  ControlSend,, ``, ahk_id %wowid2%
Return

!^`::
KeyWait !
KeyWait ^
KeyWait `,
IfWinActive, World of Warcraft
  ControlSend,, ^``, ahk_id %wowid2%
Return

!+`::
KeyWait !
KeyWait +
KeyWait `,
IfWinActive, World of Warcraft
  ControlSend,, +``, ahk_id %wowid2%
Return


Let me clarify this: You want to only act on these keypresses upon their release?
And: alt-shift-` --> send shift-`
. . . . alt-ctrl-` . --> send ctrl-`
. . . . alt-` . . . . --> send `
. . . .` . . . . . . . --> send ` (ie acts as normal)
Is this coorect?

Emeraldas wrote:
The help pages I've seen for special characters and the like make no mention of the grave key
In Autohotkey it's known as the "accent" key

Emeraldas wrote:
If it's not one thing, it's another, right?
Laughing
Yep, that's programming .. things have to be 100% EXACTLY CORECT
Even in the smallest/simplest of scripts, there's a surprising amount that can go wrong!
Back to top
View user's profile Send private message Visit poster's website
Emeraldas



Joined: 19 Nov 2009
Posts: 8

PostPosted: Mon Nov 23, 2009 9:03 am    Post subject: Reply with quote

Okay, I figured out that to get the CTRL and Shift keys to send properly to work with World of Warcraft, I apparently need to do the Down and Up states on either side. I'm also forcing the left version just simplicity since that's what I normally press when I'm binding, just to prevent future issues. Now I can go on to levelling or playing two characters of differing classes at once and using my pets for extra damage (I bound pets to ` for easy access).

Thanks for the help to all who offered suggestions and support.[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
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