AutoHotkey Community

It is currently May 27th, 2012, 1:33 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: ` (Grave) Key
PostPosted: November 20th, 2009, 11:39 am 
Offline

Joined: November 19th, 2009, 6:31 pm
Posts: 8
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 11:44 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
`` ` (literal accent; i.e. two consecutive escape characters result in a single literal character)

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Invalid hotkey
PostPosted: November 20th, 2009, 12:18 pm 
Offline

Joined: November 19th, 2009, 6:31 pm
Posts: 8
`` results in an invalid hotkey error.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 12:22 pm 
R u sure u mean "`" and not "ยด"?!
Cause if u mean "`" u'll have to press Shift aswell...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 12:24 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
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:


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: ` (Grave) Key
PostPosted: November 20th, 2009, 2:58 pm 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
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%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 3:37 pm 
Offline

Joined: November 19th, 2009, 6:31 pm
Posts: 8
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: ` (Grave) Key
PostPosted: November 21st, 2009, 9:59 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
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?
:lol:
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2009, 10:03 am 
Offline

Joined: November 19th, 2009, 6:31 pm
Posts: 8
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]


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Blackholyman, bobbysoon, iDrug, Ohnitiel, Tipsy3000, Yahoo [Bot] and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group