How do I make a macro to cycle between scripts?

I’m trying to make a macro that cycles between scripts each time I press a button.

For Example:

/script SetRaidDifficultyID(3);
/script SetRaidDifficultyID(5);
/script SetRaidDifficultyID(4);
/script SetRaidDifficultyID(6);

Currently each script will run sequentially all at once without stopping after each script.

Is it possible to build a macro that will run a number of scripts in sequence one at a time and cycle to the next one on subsequent button presses?

-FelixFTW

Looks like I was overly complicating this. The solution ended up being simple.

I simply made a macro as follows:

/run if GetLegacyRaidDifficultyID() == 3 then SetLegacyRaidDifficultyID(4) end
/run if GetLegacyRaidDifficultyID() == 4 then SetLegacyRaidDifficultyID(5) end
/run if GetLegacyRaidDifficultyID() == 5 then SetLegacyRaidDifficultyID(6) end
/run if GetLegacyRaidDifficultyID() == 6 then SetLegacyRaidDifficultyID(3) end

Each time I hit the button, it cycles to the next raid difficulty.

Felix

I know this is an old thread. I thought I should add the macro for changing dungeon difficulty. Here goes…

/run if GetDungeonDifficultyID() == 1 then SetDungeonDifficultyID(2) end
/run if GetDungeonDifficultyID() == 2 then SetDungeonDifficultyID(23) end
/run if GetDungeonDifficultyID() == 23 then SetDungeonDifficultyID(1) end