I took your code and adjusted it to the following:
function logger() {
console.log(SpreadsheetApp.getActiveSpreadsheet().getSheets()[0].getCurrentCell().getA1Notation());
}
function getSelectedCell() {
return SpreadsheetApp.getActiveSpreadsheet().getSheets()[0].getSelection().getCurrentCell();
}
function selectNextCell() {
return getSelectedCell().offset(0,1).activate();
}
function tester() {
logger(); //B2
selectNextCell();
logger(); //C2
selectNextCell();
logger(); //C2
}
I put your global code into a function called getSelectedCell() which simply gets the selected cell on the first sheet in the spreadsheet. I adjusted selectNextCell() to use that function, and activate the cell to the right using the offset method.
Please note that if the next cell to the right is beyond the current columns in the sheet, the logger function will log that cell as the active one, but it won't appear on screen unless you write a value to that cell. For example, if you only have columns A thru B and run the tester function, it will log A1, B1, and C1, but column C will not appear on the screen unless you write a value to a cell in that column.
Hope this helps!
-Eddie Friedman