Tell application 'System Events' to keystroke theIncrementValue + 5 as string Tell application 'System Events' to keystroke tab Tell application 'System Events' to keystroke thisValue as string
Tell application 'System Events' to keystroke 'p' using command down Repeat with theIncrementValue from startPage to totalPages - 1 by 5