# Macro Variables

**URL:** <https://wowlazymacros.com/t/macro-variables/16557>\
**Category:** GSE: Troubleshooting\
**Created:** [September 29, 2020, 12:34pm UTC](https://wowlazymacros.com/t/macro-variables/16557 "2020-09-29T12:34:06Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimothyLuke](https://wowlazymacros.com/user_avatar/wowlazymacros.com/timothyluke/32/237_2.png) [@TimothyLuke](https://wowlazymacros.com/u/TimothyLuke)\
**Post date:** [September 29, 2020, 12:34pm UTC](https://wowlazymacros.com/t/macro-variables/16557/1 "2020-09-29T12:34:07Z")

</div>

Ok just added in a new feature that will be part of the 2.6 release. It is a game changer to a degree. You can create custom variables on a macro base that can be used to substitute . EG you could have a set of options like `[nochanelling,blah,blah,blah]` you could set a variable called say 'MOD" and replace that list with ` ~~MOD~~ ` There is a ` ~~GCD~~ ` that comes out of the box and replaces with your OOC GCD. `/click pause ~~GCD~~ ` for example. A variable can also be a function as long as it returns a value. eg: `function() return getcooldown(somespell) end`

Full Detail (including Screenshots): [Allow for variables to be added to macros · Issue #691 · TimothyLuke/GSE-Advanced-Macro-Compiler · GitHub](https://github.com/TimothyLuke/GnomeSequencer-Enhanced/issues/691)

---

<div class="post-metadata">

**Author:** ![Siodar](https://wowlazymacros.com/user_avatar/wowlazymacros.com/siodar/32/16965_2.png) [@Siodar](https://wowlazymacros.com/u/Siodar)\
**Post date:** [September 29, 2020, 8:18pm UTC](https://wowlazymacros.com/t/macro-variables/16557/2 "2020-09-29T20:18:05Z")

</div>

i am very interested in this. going to check it out.

---

<div class="post-metadata">

**Author:** ![TimothyLuke](https://wowlazymacros.com/user_avatar/wowlazymacros.com/timothyluke/32/237_2.png) [@TimothyLuke](https://wowlazymacros.com/u/TimothyLuke)\
**Post date:** [September 29, 2020, 10:06pm UTC](https://wowlazymacros.com/t/macro-variables/16557/3 "2020-09-29T22:06:38Z")

</div>

Just to be aware though these are not dynamic. They are evaluated while you are out of combat. If a proc ups your haste temporarily, this won’t be reflected in the GCD variable. If you change gear out of combat though, this will be reflected.

---

<div class="post-metadata">

**Author:** ![TimothyLuke](https://wowlazymacros.com/user_avatar/wowlazymacros.com/timothyluke/32/237_2.png) [@TimothyLuke](https://wowlazymacros.com/u/TimothyLuke)\
**Post date:** [September 30, 2020, 1:47am UTC](https://wowlazymacros.com/t/macro-variables/16557/4 "2020-09-30T01:47:52Z")

</div>

![](https://wowlazymacros.com/uploads/default/original/2X/5/598a48345b22628de7e6273421e4b5fc6b4a9251.png)  
 ![](https://wowlazymacros.com/uploads/default/original/2X/3/3c9ef94ee86834d1ba7493434c5b855f2e2c0ab1.png)

Note the MOD variable and how its used in the macro  
For the other two lines - this is what they output.  
 ![](https://wowlazymacros.com/uploads/default/original/2X/d/d66cf73448cc13bb91ca8c6cb508dddb00ad8eba.png)

---

<div class="post-metadata">

**Author:** ![lutechi](https://wowlazymacros.com/user_avatar/wowlazymacros.com/lutechi/32/547_2.png) [@lutechi](https://wowlazymacros.com/u/lutechi)\
**Post date:** [September 30, 2020, 2:41am UTC](https://wowlazymacros.com/t/macro-variables/16557/5 "2020-09-30T02:41:50Z")

</div>

Love it, can’t wait to try it. Been waiting for it LOL 😉

---

<div class="post-metadata">

**Author:** ![gamers](https://wowlazymacros.com/user_avatar/wowlazymacros.com/gamers/32/10154_2.png) [@gamers](https://wowlazymacros.com/u/gamers)\
**Post date:** [September 30, 2020, 5:10pm UTC](https://wowlazymacros.com/t/macro-variables/16557/6 "2020-09-30T17:10:06Z")

</div>

I don’t think I understood what is variable in the addon I don’t even see it inserted and I downloaded the new version what would it do in practice for example me playing hunter bm?

---

<div class="post-metadata">

**Author:** ![TimothyLuke](https://wowlazymacros.com/user_avatar/wowlazymacros.com/timothyluke/32/237_2.png) [@TimothyLuke](https://wowlazymacros.com/u/TimothyLuke)\
**Post date:** [October 1, 2020, 6:35am UTC](https://wowlazymacros.com/t/macro-variables/16557/8 "2020-10-01T06:35:42Z")

</div>

@gamers You wont see it till Prepatch hits.

---

<div class="post-metadata">

**Author:** ![theballz7877](https://wowlazymacros.com/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@theballz7877](https://wowlazymacros.com/u/theballz7877)\
**Post date:** [October 19, 2020, 10:04pm UTC](https://wowlazymacros.com/t/macro-variables/16557/9 "2020-10-19T22:04:58Z")

</div>

I am trying to think of how to use this for my classic hunters burst macro. I lost it in the update and now i need to rebuild it. but I’m thinking of how to put in the aimed shot cd time so if i spam it I don’t clip my autoshots. The one i had working popped my earthstrike and rapid fire and then aimed shot multi shot. It was really good at deleting people lol

---

<div class="post-metadata">

**Author:** ![Cass](https://wowlazymacros.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Cass](https://wowlazymacros.com/u/Cass)\
**Post date:** [January 17, 2021, 6:50am UTC](https://wowlazymacros.com/t/macro-variables/16557/10 "2021-01-17T06:50:11Z")

</div>

@TimothyLuke I have been playing around with this. It appears variables are not recalculated during combat? My testing seems to indicate no. If it can, then I am guessing a macro cannot read the changed value until after combat ends? This would be awesome if it did, but simple reading of GetSpellCooldown would mean we could create conditionals in our macro, a real BIG game changer if this was allowed. For example, the following variable is not re-evaulated during combat when I GSE.Print() in a macro sequence:

function() local start, duration= GetSpellCooldown(19574) if ( start \> 0 and duration \> 0) then local cdLeft = start + duration - GetTime() return tostring(cdLeft) end return tostring(0) end

---

<div class="post-metadata">

**Author:** ![TimothyLuke](https://wowlazymacros.com/user_avatar/wowlazymacros.com/timothyluke/32/237_2.png) [@TimothyLuke](https://wowlazymacros.com/u/TimothyLuke)\
**Post date:** [January 17, 2021, 10:38am UTC](https://wowlazymacros.com/t/macro-variables/16557/11 "2021-01-17T10:38:30Z")

</div>

They are only evaluated out of combat as once combat starts they are locked. If you want gSE to calculate in combat this is possible but not on Blizzard servers. **This limitation is explicitly noted everywhere I talk about Variables.**

---

<div class="post-metadata">

**Author:** ![TimothyLuke](https://wowlazymacros.com/user_avatar/wowlazymacros.com/timothyluke/32/237_2.png) [@TimothyLuke](https://wowlazymacros.com/u/TimothyLuke)\
**Post date:** [January 17, 2021, 10:39am UTC](https://wowlazymacros.com/t/macro-variables/16557/12 "2021-01-17T10:39:04Z")

</div>

> [@TimothyLuke](#):
>
> Just to be aware though these are not dynamic. They are evaluated while you are out of combat. If a proc ups your haste temporarily, this won’t be reflected in the GCD variable. If you change gear out of combat though, this will be reflected.

From earlier in this thread …

---

<div class="post-metadata">

**Author:** ![Cass](https://wowlazymacros.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Cass](https://wowlazymacros.com/u/Cass)\
**Post date:** [January 17, 2021, 2:18pm UTC](https://wowlazymacros.com/t/macro-variables/16557/13 "2021-01-17T14:18:04Z")

</div>

Thank you, I missed that, I read the top post, but didn’t fully read the remainder of the thread, my apologies. 🙂

---

<div class="post-metadata">

**Author:** ![Thulester](https://wowlazymacros.com/user_avatar/wowlazymacros.com/thulester/32/26571_2.png) [@Thulester](https://wowlazymacros.com/u/Thulester)\
**Post date:** [January 26, 2021, 4:41pm UTC](https://wowlazymacros.com/t/macro-variables/16557/14 "2021-01-26T16:41:44Z")

</div>

I’ve tried using `/click pause ~~GCD~~ `

As far as I can tell it isn’t working. The reason I was playing with this was to solve my timing problems (using debug).

I understand that ` ~~GCD~~ ` is a feature of gse2. I was able to use the print command in this thread to prove the variable has a value. But /pause isn’t documented anywhere as being a supported wow macro command.

Is `/pause` command gse2 provides?

---

<div class="post-metadata">

**Author:** ![TimothyLuke](https://wowlazymacros.com/user_avatar/wowlazymacros.com/timothyluke/32/237_2.png) [@TimothyLuke](https://wowlazymacros.com/u/TimothyLuke)\
**Post date:** [January 26, 2021, 7:40pm UTC](https://wowlazymacros.com/t/macro-variables/16557/15 "2021-01-26T19:40:43Z")

</div>

Yes it’s only a GSE thing and you need to set it up in GSE’s options. Was added a year ago.

> <https://github.com/TimothyLuke/GSE-Advanced-Macro-Compiler/issues/615>
>
> create a "/click pause n" command that will wait n seconds before moving to the …next line. We can do that by knowing the Millisecond delay that the player is using. A ms of 100 would mean that if they are spamming the key - count 10 clicks before moving on to the next line.
> 
> This will only work for those who are writing spammable macros with a consistent number of clicks.

* * *

Catch me on Twitch  
https://player.twitch.tv/?channel=thetimothyluke&parent=wowlazymacros.com&autoplay=false

---

<div class="post-metadata">

**Author:** ![Buenor](https://wowlazymacros.com/user_avatar/wowlazymacros.com/buenor/32/7368_2.png) [@Buenor](https://wowlazymacros.com/u/Buenor)\
**Post date:** [March 16, 2021, 5:16pm UTC](https://wowlazymacros.com/t/macro-variables/16557/16 "2021-03-16T17:16:06Z")

</div>

> [@TimothyLuke](#):
>
> Ok just added in a new feature that will be part of the 2.6 release. It is a game changer to a degree. You can create custom variables on a macro base that can be used to substitute . EG you could have a set of options like `[nochanelling,blah,blah,blah]` you could set a variable called say 'MOD" and replace that list with ` ~~MOD~~ `

I was wondering if i could get a little more information on this. I checked the site and other comments but it was just for that GCD thing, but maybe im blind. I think it would be a nice tool to have in the toolbox but not necessarily a needed one being as you can just copy and paste stuff. I just need a little more info on how to implement it.

And that might be a never mind, i found some more info [coincidentally here](https://wowlazymacros.com/t/how-to-set-viarabile-macro/17553/5). Is this how you would do it then?

And after reading and understanding how this works a little more now i can see you did say it, even though it was briefly  
“variable Trinket1 = 13  
/use ~ ~Trinket1~~”

And I have now watched the video, thanks for all the info. And GSE3 looks like the original GS where you had to edit the file external of wow and had to know the format and stuff.

---

<div class="post-metadata">

**Author:** ![TimothyLuke](https://wowlazymacros.com/user_avatar/wowlazymacros.com/timothyluke/32/237_2.png) [@TimothyLuke](https://wowlazymacros.com/u/TimothyLuke)\
**Post date:** [March 16, 2021, 8:39pm UTC](https://wowlazymacros.com/t/macro-variables/16557/17 "2021-03-16T20:39:44Z")

</div>

> [@Buenor](#):
>
> And GSE3 looks like the original GS where you had to edit the file external of wow and had to know the format and stuff.

No the UI will cover this. But if you understand what is underneath it makes you more accurate. In GSe1 and GSE2 there were a lot of hidden things that happened. This is bringing those to the forefront and putting them under the macro authors control.

---

<div class="post-metadata">

**Author:** ![Buenor](https://wowlazymacros.com/user_avatar/wowlazymacros.com/buenor/32/7368_2.png) [@Buenor](https://wowlazymacros.com/u/Buenor)\
**Post date:** [March 18, 2021, 3:21pm UTC](https://wowlazymacros.com/t/macro-variables/16557/19 "2021-03-18T15:21:35Z")

</div>

Well regardless, im excited to see what it is like. And thank you for all that you do.
