spreadsheet.sikuli

(Download this script)
#
# Simple Google Spreadsheet robot
# Author: Pawel Foremski <pjf@iitis.pl>
#
# 1. Create new Google spreadsheet, it will start in A1 field
# 2. Arrange the windows so the browser window gets
#    focus when you click "Run" in Sikuli.
#
# STOP KEY: alt + shift + c
#

import random

num_rows = 30
num_cols = 10

for j in xrange(num_cols):
    for i in xrange(num_rows):
        type(str(random.randint(1, 10000)))
        type(Key.DOWN)
        sleep(random.expovariate(2))

    type("=AVERAGE(" + chr(ord('A')+j) + "1:" + chr(ord('A')+j) + str(num_rows) + ")\n")
    sleep(random.expovariate(0.3))

    type(Key.RIGHT)
    for i in xrange(num_rows + 2):
        type(Key.UP)