add buffer and window record scripts