Well, for beginning, here is short and simple script to zoom page. There are a few approaches to selecting page, but for this I will use simplest method.
app.activeWindow.activePage = app.activeDocument.pages.item(0); app.activeWindow.zoom(ZoomOptions.FIT_PAGE);
So, the first line, tells InDesign to set active page to number in parentheses. (remember that most InDesign app variables are Arrays, and first element in Array is element 0, so the first page is represented with 0) Second line is going to zoom page and fit it in window. Here are fitting options that you can use:
ZoomOptions.FIT_SPREAD ZoomOptions.FIT_PAGE ZoomOptions.SHOW_PASTEBOARD
So, that’s it, nothing special, but sometimes so hard to find, especially when you are beginner.