Trying to make simple macro that changes my cursor size between Small & Large with 1 click

I’m a large-cursor user in most things, but for certain tooltips (namely in pet battles, but other things too) the giant cursor straight up blocks the text, and moving the cursor to read it clearly always ends up making it disappear since the cursor needs to be on it.

Having a macro that I could click to easily switch my cursor size from ‘2’ to ‘0’ to read something, and then be able to click it again and have it switch back to ‘2’ would be SO helpful and convenient.

For reference, I currently use this macro a LOT:

“/run local c = “Sound_MasterVolume”; local s = GetCVar(c) or “0.5”; if s == “1” then SetCVar(c, “0.4”) else SetCVar(c, “1”) end”

This is a master volume macro that I can easily click to change the game’s master audio from being 100% to 40%- super useful when someone on discord calls, I need to talk to someone irl, talk to my google home, have a youtube video on the 2nd monitor- whatever. When I’m finished? I click the button again and the master volume returns back to 100%.

I’m pretty much looking to get the exact same logic but for

/console cursorsizepreferred 0
&
/console cursorsizepreferred 2

I tried slapping ‘or’ between the two, but unsurprisingly, it didn’t work lol. Anyone able to help?

/run local cvar,v1,v2 = "cursorsizepreferred","0","2" SetCVar(cvar,GetCVar(cvar)==v1 and v2 or v1) print(cvar,"is now",GetCVar(cvar))

You can use this as a generic cvar toggle too, by replacing the name of the cvar (“cursorsizepreferred”) and the two values (“0” and “2”).

For instance to toggle Sound_MasterVolume between “1” and “0.4”:

/run local cvar,v1,v2 = "Sound_MasterVolume","0.4","1" SetCVar(cvar,GetCVar(cvar)==v1 and v2 or v1) print(cvar,"is now",GetCVar(cvar))

These also print what the cvar was changed to. You can remove the print (and everything after it) if you’d prefer to not have the added spam.

2 Likes

Thank you so much! It seems so simple now but naturally that wooshed right over my head. Thanks for your help! This works perfectly :slight_smile: