Is there a way to get the current slide the user is on? Google Slides, and Apps Script

I'm trying to create a game in Google Slides and need to have a system where if the user is on a certain slide, a variable is changed. How is this possible?

I have already tried to use SlidesApp.getActivePresentation().getSlides() SlidesApp.getActivePresentation().getSelection().getCurrentPage();

var currentPresentationSlide = SlidesApp.getActivePresentation().getSlides()[3];
var currentPage = SlidesApp.getActivePresentation().getSelection().getCurrentPage();

var selection = SlidesApp.getActivePresentation().getSelection();


if (currentPage = currentPresentationSlide) {
  var shape = currentPresentationSlide.insertShape(SlidesApp.ShapeType.TEXT_BOX, 100, 200, 300, 60);
  var textRange = shape.getText();
  textRange.setText('demo');
}

I want Slides to place the text box (demo) on the slide (in this case it slide 3) It doesn't even place the text box anywhere.


  • User is presenting by the presentation mode.
  • Under above situation, you want to retrieve the current page that the user is staying.

I understand about your question like this. Unfortunately, in the current stage, this cannot be achieved by the following reasons.

  1. There are no methods for confirming whether user who is not owner is staying in the presentation mode, yet.
  2. There are no event triggers for the presentation mode, yet.
    • You can see about the triggers at here.
  3. When you run the script, the page that you are opening becomes the current page. It's not other user's page. When the script is run, the page that you are opening is retrieved.