Activate a cell and directly edit this with your keyboard

9 views
Skip to first unread message

Johan Kraaijeveld

unread,
May 25, 2020, 2:59:25 PM5/25/20
to Google Apps Script Community
Hi there, 

I'm setting a cell per user and want to load a new game with this activation.
After the cell is activated I'll have to click with my mouse before I can edit it.
Is there a way that after the reset the user direct can start with his keyboard input?
Code i use is:

function cursor() {
  var user = getUser();
  activateCell(user);

};

function getUser() {
  var user = Session.getActiveUser().getEmail();
  Logger.log(user);
  return user;
};

function activateCell(user) {
   
   
 var cell;

   if (user="j...@gmail.com") {
   var spreadsheet = SpreadsheetApp.getActive();
     var first = spreadsheet.getSheetByName("x01");  
         first.getRange(5,9).activate();
    };
      
Reply all
Reply to author
Forward
0 new messages