Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » User Interface and AddOns

Reply
 
LinkBack Thread Tools
Old 04/16/09, 10:49 PM   #1
Peacemaker7
Von Kaiser
 
Peacemaker7's Avatar
 
Gnome Mage
 
Kil'Jaeden
How to set KeyDown, not KeyUp triggering actions

When a keyboard button is pressed which is keybound to an action bar button, the action bar button lights up. Only when the key is released, does the action trigger behavior in game.

I want the actions I have bound to keys to trigger as the key is pressed down, not as the key is released which is the default. Does anybody know how to configure this?

(I have searched and am unable to locate this on my own. Therefore I do not believe I am asking for 'handholding').

Thank you.

Offline
Reply With Quote
Old 04/17/09, 1:48 AM   #2
Chlor
Glass Joe
 
Human Death Knight
 
Proudmoore
I believe the relevant API functions are now protected (i.e. not usable).

World of Warcraft API - WoWWiki - Your guide to the World of Warcraft

PROTECTED UI ActionButtonDown(id)   - Press the specified action button. (2.0 Protected) 
PROTECTED UI ActionButtonUp(id)   - Release the specified action button. (2.0 Protected)
This function is PROTECTED, and can only be called from Blizzard code.
It has been protected since patch 2.0.
You may be able to use a programable keyboard to perform a really fast down/up combo of a button, but only if the keyboard's software allows a function on button down itself. Let me know if you have any luck as I can see the obvious benefit in latency reduction alone.

[e] Just thinking about this a bit more...you could use AutoHotKey (which isn't really approved of by Blizzard iirc) to listen for key-presses, then fire off a zero-latency down/up combination of the button bound to an action in WoW. Provided it only fires off one key press I can't see this being against the TOU. I'll have a look at this tonight and see if I can get it working.

Last edited by Chlor : 04/17/09 at 2:30 AM.

Offline
Reply With Quote
Old 04/17/09, 5:54 AM   #3
S0und
Glass Joe
 
Night Elf Druid
 
Kazzak (EU)
You can do this with autohotkey.

Send


"Repeating or Holding Down a Key "

Offline
Reply With Quote
Old 04/17/09, 1:55 PM   #4
Peacemaker7
Von Kaiser
 
Peacemaker7's Avatar
 
Gnome Mage
 
Kil'Jaeden
Originally Posted by S0und View Post
You can do this with autohotkey.

Send


"Repeating or Holding Down a Key "
Thank you. I am going to give this a try. As a test, I am going to try mapping my 2 key to the macro:
Send {4 down}{4 up}{2 down}{2 up}

2 casts FrostFire Bolt
4 casts Living Bomb

This should cast Living Bomb on the target if not present, otherwise immediately cast FFB. All with zero latency.


Offline
Reply With Quote
Old 04/19/09, 1:54 PM   #5
Gogusrl
Piston Honda
 
Gogusrl's Avatar
 
Orc Warlock
 
Jaedenar (EU)
I`m pretty sure that all the Blizzard regulations against macroing can be condensed into : one action per button push. What you want to do goes against that so be careful.

Offline
Reply With Quote
Old 04/21/09, 3:57 AM   #6
sarf
Great Tiger
 
sarf's Avatar
 
Fars
Human Paladin
 
No WoW Account (EU)
Yes. Also, check out the bindings.xml file - you can set stuff to run on both down and up. I am unsure how to leverage this into doing secure things on the down event, though.

What is the purpose, by the way? Doing one thing on click and another on release? Or just trigging stuff quicker?

"Let me be clear... I am prepared to claim any level of incompetence, no matter how absurd, in order to avoid culpability." SMBC #2387

Offline
Reply With Quote
Old 04/22/09, 4:17 AM   #7
Prinsesa
Bald Bull
 
Blood Elf Paladin
 
Echo Isles
Expounding the autohotkey solution a little more, this is the basic script that I use:

#ifWinActive World of Warcraft
{
$1::
   Loop  
   {
    if not GetKeyState("1", "P")
      break
     Send 1
     sleep 1
    }
return
$2::
   Loop  
   {
    if not GetKeyState("2", "P")
      break
     Send 2 
     sleep 1
    }
return
Notes:

* If you want to add more keys to this, simply copy over everything from line 3 ("$1::") to line 11 ("return") and replace all instances of "1" with your desired key.

* This works really well for spamming a single spell without having to mash the button

* This also works well for firing off a single (instant) spell as soon as you come in range (say, Moonfire on a target you're pursuing)

* You'll probably want to get an addon or macro to clear error messages, as you will be spammed

* I've used this in tandem with the macro below to great effect on my Ret and Prot Paladins, since all of their abilities have cooldowns:

/castrandom Judgement of Wisdom, Exorcism, Crusader Strike, Divine Storm, Consecration
/castrandom Judgement of Wisdom, Consecration, Holy Shield, Hammer of the Righteous
Technically, you'd get more mileage out of doing the rotation by hand, but I'm willing to trade a little performance for a lot less hassle.

* You're going to get into trouble if you try this with a no-cooldown spell, like so:

/castandom Icy Touch, Plague Strike, Scourge Strike
There's nothing to make the macro ignore IT or PS if the diseases are already up, and since the runes will activate one at a time, you're almost never going to see a Scourge Strike ever get cast. The same would apply to a "/castrandom Living Bomb, Frostfire Bolt" macro as well; half the time you'll be recasting LB with nothing to show for it.

* This script also has the nasty side-effect of making it difficult to type single 1's and 2's when chatting. You can get around that by increasing the Sleep veriable, but I just disable the script in town or type explicit 'one's and 'two's in combat, since increasing the sleep may introduce some delay in casting if the castrandom keeps picking an unavailable spell.

* Finally, while the first line is supposed to enable the script only when your active window is World of Warcraft, it also activates when you're browsing the WoW forums, since "World of Warcraft" also appears in the window title.

Help needed:

* Is there some way to 'turn on/off' a script programmatically? I want to assign it to a key instead of right-clicking the script's taskbar icon and selecting "Suspend Hotkeys"

* Is there some way to increase the specificity of the window title detection so that "World of Warcraft - English (NA) Forums -> Damage Dealing - Mozilla Firefox" isn't included in "World of Warcraft"?

"We do want Sanctuary to be the tanking seal"

- Ghostcrawler

Offline
Reply With Quote
Old 04/22/09, 10:01 PM   #8
Chlor
Glass Joe
 
Human Death Knight
 
Proudmoore
You can use the Pause command, hotkeyed to some button you don't use like ~ to pause the script at any point.

Pause

To prevent AHK from thinking the WoW forums are a WoW window you could use the ExcludeTitle variable when calling IfWinActive to exclude 'forum' - this should do the trick.

IfWinActive / IfWinNotActive

Offline
Reply With Quote
Old 04/23/09, 8:07 AM   #9
richard
Piston Honda
 
Human Death Knight
 
Kazzak (EU)
Many functions from AutoHotkey are NOT allowed by Blizzard. There was a thread on this a while ago: The AutoHotKey Thread (from post #41 there are blue confirmations.)

Offline
Reply With Quote
Old 04/23/09, 11:27 AM   #10
Ajuga
Piston Honda
 
Ajuga's Avatar
 
Undead Mage
 
Jaedenar (EU)
@Prinsesa

"This works really well for spamming a single spell without having to mash the button"

This is not allowed. One key, one action. Holding the key can produce several actions, therefore it is not allowed.

-

However setting KeyDown (instead of KeyUp) to an action should be no problem at all. I do it myself using HotkeyNet.

Offline
Reply With Quote
Reply

Go Back   Elitist Jerks » User Interface and AddOns

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
OPie - Radial Actions Addon Sethik User Interface and AddOns 103 10/08/08 12:53 PM
Actions Per Minute (APM) addon Chemoshvt User Interface and AddOns 13 04/07/08 10:39 AM