0

I have a script in a google spreadsheet which changes the activated cell. I you have selected A1 for example the script activates A3. If you run it again it selects A5 and so on.

This is what it should do. Now I want the script to be run timer-based in foreground.

I installed a trigger for that but the script only runs in background when started by the trigger.

Background is that I have a PC running, showing an overview list. This List has now grown to be longer than the Monitor can display. So I want the PC to automatically scroll through the document let's say one step every minute.

I could do it with an iteration but that would stop the script after the execution time out of 6 minutes while the script should run about 8h a day.

Any ideas how to solve this problem?

Rubén
  • 34,714
  • 9
  • 70
  • 166
an d re
  • 153
  • 2
  • 6

2 Answers2

0

Don't use GAS for this. It runs server side with it's non-adjustable constraints.

Use something like an automator which will simulate keyboard commands. You can script it client side, by sending the "down" button to scroll through your list. Check "Autoit" for windows.

Sujay Phadke
  • 2,145
  • 1
  • 22
  • 41
0

not possible using triggers as they can only perform server side work. the only possible way with apps script is to open a sidebar from onOpen and use setInterval to keep calling your server function.

this also consumes less time quotas as most of the time is spent from clientside than relying on the 6minute server limitto keep updating state.

Zig Mandel
  • 19,571
  • 5
  • 26
  • 36