Try adding this to any button you want to trigger the switch to the next cue:
Code:
StopCell
ShiftFocus 1
StartCell
exit
StopCell / StartCell act on whatever cue is currently focused on the active grid, and ShiftFocus moves the cell focus by the amount specified. The focus doesn't care if there is a cue in the cell or not, so empty cells will give you blank steps but it won't break. This will only play cues on the active page; as soon as it hits the bottom right cell it will wrap back around to the top left. If you instead want to move from the last cue on the current page to the first cue on the next page, add a conditional to switch pages when you hit the last cell:
Code:
StopCell
if (Grid.CellIndex = (Grid.GetRowCount * Grid.GetColCount)) SelectNextPage
ShiftFocus 1
StartCell
exit
If you have MIDI buttons mapped to the grid (in the "MIDI Surface - Main Grid" or "MIDI Surface - Secondary Grid" sections of your MIDI device config) and want this script to work with them (i.e. if you use a grid button to pick a specific cue and then want the next invocation of the script to switch to the cue after it), you need to have the option checked under Settings > Configuration > 'Grid' tab > "Focus cues in the grid when activated by MIDI" . Hope this helps!