Is it possible to sum a range of cells while ignoring rows which are not hidden?
I'm not sure if you necessarily require a Google Apps Script solution; the tags you have used suggest that a spreadsheet formula might be adequate. If this is the case, then it is definitely possible to sum only rows that are not hidden with SUBTOTAL.
will sum all cells in column A that are not hidden.
Turns out its not possible (for now).