Log in

View Full Version : AutoHotKey Problem/Question



Octaviann
05-19-2008, 05:05 PM
I'm having a small, annoying problem with AutoHotKey that I can't figure out. It was working before, and I was dual-boxing my 2 new mages for the first time (first dual-boxing for me!), and then I added in the /assist functionality so that I wouldn't have to macro it into every single spell. I chose to assign my /assist macro to the ` key (the one to the left of the 1), and, for whatever reason, AutoHotKey refuses to pass that key to the other windows. It's kind of annoying as until I fix it, I am forced to manually target both windows, which mostly ruins the point of using AutoHotKey. Is there any reason why the following line of code, for example, won't work for AHK? I use the standard ClonesPush copied directly from the wiki, and my entire script is copied and pasted except that the = key is mapped to a quickbar slot, as is the -, and the ` key is used where the = key used to be as a /assist macro. My macro simply reads "/assist Thingoneone" for the second character and "/assist Thingtwotwo" for the first, and I've checked that the macro does indeed work by itself. Additionally, it's definently passing all of the characters except the ` because it'll cast spells once I've found a target.


~1::ClonesPush("{` down}{` up}{1 down}{1 up}")



Thanks for your help,

Octaviann

wowphreak
05-20-2008, 12:56 AM
try
~`::ClonesPush("{` down}{` up}")

Chorizotarian
05-20-2008, 01:19 AM
From the AHK help:


AutoHotkey's default escape character is accent/backtick (`), which is at the upper left corner of most English keyboards. Using this character rather than backslash avoids the need for double blackslashes in file paths.

Since commas and percent signs have special meaning in the AutoHotkey language, use `, to specify a literal comma and `% to specify a literal percent sign. One of the exceptions to this is MsgBox, which does not require commas to be escaped. Another exception is commas in the last parameter of any command: they do not need to be escaped. See #EscapeChar for a complete list of escape sequences.

So I think you want this:


~1::ClonesPush("{`` down}{`` up}{1 down}{1 up}")

I always try it in notepad to make sure I get the expected result :P

Octaviann
05-20-2008, 04:02 PM
Thanks for the help. I figured out on my own that it didn't like the ` key, so i rebound my assist macro to F12, and it works now, and that also lets me use the ` key as a button for an ability, so that's even better.