Macro question

I have found the solution to my macro question.

Short answer: No, not possible in a wow macro.

But to elaborate:
You’re confusing some very distinct concepts in your question. The actual thing you want to accomplish (which you haven’t mentioned) may perhaps be possible, but what you’ve described is not.

.

Macros
Macros are little scripts that contain one or more commands. Commands exist for lots of different things, they could perform actual player actions (such as /cast Frostbolt), cause you to say something in chat (/raidwarning get ready) or invite a player (/invite thatdudefromwork), or many many other things (but none related to triggering keys). Infact, they do not have anything to do with hotkeys, keybinds, keys or buttons at all*. Macros are usually placed in one of the slots on the action bar.

  • = There is the tiny exception of modifiers, but that’s not relevant to what you want

Key bindings
Hotkeys or key bindings as wow calls them, are a way for wow to let you tie one of the slots on your action bar to a specific key/button on your keyboard/mouse.

If you’ve made a keybinding between the “Q” key and the topleft action bar slot, then whatever ability or macro (!) or mount (or whatever) you place on the action bar there, will be triggered when you press the Q button.

Back to your question
So while it is not possible for a macro to trigger any key, the reason you are asking for that is presumably because you have already bound those 2 keys (F1 and F2) to specific actions.
It may be possible to have a macro perform those 2 actions themselves, without involving the F1 and F2 keys. And of course, then it would be possible to put this new macro on your action bar somewhere, and create a new key binding (lets say the F9 key) for it. This way, when you press F9, the same thing happens as when you press both F1 and F2 together.

So basicly: Tell us what your F1 and F2 currently do, and we can probably tell you if you could combine those 2 things in a single macro.

.

Keyboard Macros (outside of wow)
On top of everything i described above, there is an alternative that you may have been thinking off, but as far as i know it is not allowed and is not wow-specific.

Many keyboards and mice nowadays come with fancy software (things like Razer Synapse or Logitech Gaming software, etc). This kind of software sometimes lets you make macros as well. A “macro” in these programs has a completely different meaning than macros in Wow, there is almost no overlap.

But often these macros can involve things such as “when i click the 3rd mousebutton i want it to act as if i held down the shift button and then pressed both F12 and F3”. If your keyboard doesn’t come with software like that, then various types of multiboxing programs like HotkeyNet also allow for the same type of stuff. The thing is though, while these kinds of software are perfectly fine and have various accepted use cases, the one thing you are not allowed to do with them is use them to perform multiple actions on the same character at the same time. And while your question doesn’t make it clear if that is what you’re trying to do or not, it sounds likely to me that it is.

So, if you’re trying to perform multiple actions at the same time by pressing only 1 button a single time, then stick with wow macros. In this case, if you can’t do it in a wow macro then that is likely because they do not want you to be able to do it.

.

Examples (wow macros)

A macro that does multiple target switches and some chat stuff and casts an ability, all in one click, is fine (this targets your first groupmember, lets him know you’re disappointed in him and then casts a Frostbolt at the nearest Dragonhawk):

/target [target=party1]
/disappointed
/target Dragonhawk
/say Casting a bolt of frost!
/cast Frostbolt

This macro, with 3 actual ability casts, will only cast the first spell that is available, as casting multiple actual attacks in 1 click/keypress is not allowed.

/cast Comet Storm
/cast Glacial Spike
/cast Frostbolt

So if everything was off cooldown and available then the macro above would only pop Comet Storm when you click it (or press the related key binding).
If Comet Storm is on cooldown then it would cast Glacial Spike instead, or, if that is also not available then cast Frostbolt instead.
Of course you could press the same keybind twice in a row to pop Comet Storm followed by casting Glacial Spike.

But as an exception to the rule above, some abilities (like popping on-use trinkets or certain cooldowns that buff you) can be used together and triggered in one click. If you’re unsure if 2 can be combined, just try.

/cast Arcane Power
/use 13
/use 14
/cast Mirror Image

FYI : 13 and 14 refer to the 2 trinket slots, if the trinkets do not have an on-use effect it will simply do nothing.

Ah i see,

well the macro command to turn the nameplates is (0 for off, 1 for on)
/script SetCVar("nameplateShowFriends",1);

I’m not aware of a build-in show/hide chat command, but a quick google does give the following script command to toggle between show/hide chat (which seems to work):

/run _CHATHIDE=not _CHATHIDE for i=1,NUM_CHAT_WINDOWS do for _,v in pairs{"","Tab"}do local f=_G["ChatFrame"..i..v]if _CHATHIDE then f.v=f:IsVisible()end f.ORShow=f.ORShow or f.Show f.Show=_CHATHIDE and f.Hide or f.ORShow if f.v then f:Show()end end end

Now, that script actually uses up the maximum size of a macro (255 characters), so you can’t combine it with anything else.

edit: Removed some non-functioning macro proposals. See my later reply below for a functioning one

Odd, try this (again with 0 or 1)
/script SetCVar("nameplateShowFriends",1);
that’s what i’ve actually been using and which does function for me.
I assumed that /console command was correct using the same cvar name , but i guess not then.

No, somehow i messed those 2 macros up. I wrote them here on the forum without trying it out in game (but they seemed right! ;p). They are just be copies of the original toggle script, but hardcoded to either show (in the 2nd macro) or hide (in the first macro), yet somehow i missed something.

I’ll try to patch them up in a little bit, i kinda got roped into some group content so haven’t had the chance yet.

As for potential conflicts, which 2 addons are we talking about ?

Ok, i’ve fiddled with it a little bit.

I managed to fit the whole thing in a single macro (253/255 characters). It’s not going to win any beauty pageants but it functions for me.

/script QH=not QH;SetCVar("nameplateShowFriends",QH and 1 or 0);for i=1,10 do for k,s in pairs{"","Tab"}do local f=_G["ChatFrame"..i..s];if QH then f._V=f:IsVisible();end;f._F=f._F or f.Show;f.Show=QH and f.Hide or f._F;if f._V then f:Show();end;end;end

This allows you to switch between one of these two states with a single click or key press:

  • Chatbox enabled + friendly nameplates disabled
  • Chatbox disabled + friendly nameplates enabled

Ah, yea sure:

/script QH=not QH;SetCVar("nameplateShowFriends",QH and 0 or 1);for i=1,10 do for k,s in pairs{"","Tab"}do local f=_G["ChatFrame"..i..s];if QH then f._V=f:IsVisible();end;f._F=f._F or f.Show;f.Show=QH and f.Hide or f._F;if f._V then f:Show();end;end;end

Try using
/script LeaveParty();

Ok but what you’re describing now is exactly what the earlier version did though. And tbh thats the only 2 variations that are possible. I must be missing something.

/script QH=not QH;SetCVar("nameplateShowFriends",QH and 1 or 0);for i=1,10 do for k,s in pairs{"","Tab"}do local f=_G["ChatFrame"..i..s];if QH then f._V=f:IsVisible();end;f._F=f._F or f.Show;f.Show=QH and f.Hide or f._F;if f._V then f:Show();end;end;end

Also, the macro only toggles between the 2 situations based on the last time this macro ran, it does not actually look at the current settings. (so if you manually enable or disable the friendly nameplates before using the macro, it won’t affect the result at all).

Maybe try this same macro from earlier again, but press it a couple of times after having loaded in the macro (or after logging in). Perhaps the conditions before triggering the macro are whats confusing things.

No unfortunately not due to the size restrictions.

Although you could install an addon that allows you to use longer macros.
such as this one i think (haven’t used it myself):
https://www.curseforge.com/wow/addons/long-macros

If you’re using an addon like that, then you could simply change the macro to:

/script QH=not QH;SetCVar("nameplateShowFriends",QH and 1 or 0);for i=1,10 do for k,s in pairs{"","Tab"}do local f=_G["ChatFrame"..i..s];if QH then f._V=f:IsVisible();end;f._F=f._F or f.Show;f.Show=QH and f.Hide or f._F;if f._V then f:Show();end;end;end;if QH then LeaveParty();end

which would cause it to leave the group when nameplates are turned on.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.