local _,_,sec,cmd,_,_,_ = reaper.get_action_context();
local viewadvance = reaper.SNM_GetIntConfigVar("viewadvance",0);
if viewadvance == 7 then;
reaper.SNM_SetIntConfigVar("viewadvance",3);
reaper.SetToggleCommandState(sec,cmd,1);
elseif viewadvance == 15 then;
reaper.SNM_SetIntConfigVar("viewadvance",11);
reaper.SetToggleCommandState(sec,cmd,1);
elseif viewadvance == 3 then;
reaper.SNM_SetIntConfigVar("viewadvance",7);
reaper.SetToggleCommandState(sec,cmd,0);
elseif viewadvance == 11 then;
reaper.SNM_SetIntConfigVar("viewadvance",15);
reaper.SetToggleCommandState(sec,cmd,0);
end;
reaper.RefreshToolbar2(sec, cmd);