Macro for Dual Gatherers

Hello, I chose to take herbalism and mining to start off with on this server and i searched for a long time to try and find a macro that would allow me to switch tracking between the two with one button.
I was unsuccessful, so I decided to make my own
/run local x=0 if GetTrackingTexture() =="Interface\\Icons\\Spell_Nature_Earthquake" then x=1 end if x==0 then CastSpellByName("Find Minerals") else CastSpellByName("Find Herbs") end
Enjoy
I was unsuccessful, so I decided to make my own

/run local x=0 if GetTrackingTexture() =="Interface\\Icons\\Spell_Nature_Earthquake" then x=1 end if x==0 then CastSpellByName("Find Minerals") else CastSpellByName("Find Herbs") end
Enjoy
