twitter.sikuli

(Download this script)
import os.path

info_file = 'twitter.txt'

def checkFile(info_file):
   if os.path.exists(info_file) == False:
      f = open(info_file, 'w')
      id = input("Enter your twitter ID:")
      f.write(id + '\n')
      pw = input("Enter your twitter password:")
      f.write(pw + '\n')
      f.close()

def signIn(id, pw):
    click()
    type(id)
    hitTab(1)
    type(pw)
    hitTab(3)
    click()
    wait()

def hitTab(n=1):
    for x in range(0, n):
        type("\t")

checkFile(info_file)
f = open(info_file)
id = f.readline()
pw = f.readline()
f.close()

msg = input("Enter your twitter message:")

click()
wait()
click()
wait()
doubleClick(Pattern().similar(0.40))
type("http://twitter.com/home")
click()
wait()

if find():
    signIn(id, pw)

click()
type(msg[:140])
click(Pattern().similar(0.51))
sleep(5)
type("f", KEY_ALT)
sleep(1)
type("x")
sleep(1)