Here is the new script:
numbers = {
'0':"""|||||||||||||||
||| |||
||| |||
||| |||
|||||||||||||||""",
'1':""" ||||||
|| |||
|||
|||
||||||||| """,
'2': """|||||||||||||||
|||
|||||||||||||||
|||
|||||||||||||||""",
'3': """|||||||||||||||
|||
||||||||||||
|||
|||||||||||||||""",
'4': """||| |||
||| |||
|||||||||||||||
|||
|||""",
'5': """|||||||||||||||
|||
|||||||||||||||
|||
|||||||||||||||""",
'6':"""|||||||||||||||
|||
||||||||||||| |
||| | |||
|||||||||||||||""",
'7':"""|||||||||||||||
|||
|||
|||
||| """,
'8':"""|||||||||||||||
||| |||
|||||||||||||||
||| |||
|||||||||||||||""",
'9':"""|||||||||||||||
|||| |||
|||||||||||||||
|||
|||||||||||||||""",
'10':"""||| |||||||||
||| ||| |||
||| | ||| | |||
||| ||| |||
||| |||||||||""",
'11':"""||| |||
||| |||
||| |||
||| |||
||| |||""",
}
#'11 ':"""||| |||
#||| |||
#||| || |||
#||| |||
#||| | |||""",
_traduci = {
'|||':'|', ' ||':'|', '| |':'|', '|| ':'|',
'| ':' ', ' | ':' ', ' |':' ', ' ':' ',
}
def traduci(s):
righe = s.split('\n')
tmp=[]
for riga in righe:
tmp.append( "%s%s%s%s%s" % (
_traduci[ riga[0:3] ], _traduci[ riga[3:6] ], _traduci[ riga[6:9] ], _traduci[ riga[9:12] ], _traduci[ riga[12:15] ],
) )
return "\n".join(tmp)
def OnScriptDialog(message,objectName,objectID,firstName,lastName,chatChannel,buttons):
print "message:",message
print "objectName:",objectName
print "objectID:",objectID
print "firstName:",firstName
print "lastName:",lastName
print "chatChannel:",chatChannel
print "buttons:",buttons
print dir(buttons)
try:
snumber=message[ (message.index(":")+3) : ]
snumber=snumber.replace('!','|').replace('.',' ').replace('\'',' ')
number='0'
for k in numbers.keys():
if traduci(numbers[k])==traduci(snumber):
number=k
break
print "snumber:"
print snumber
print "number: '%s'" % number
i = buttons.index(number)
print "Replying: %s-%s" % (i,buttons[i])
PyClient.ReplyScriptDialog(objectID,chatChannel,i,buttons[i])
return True
except Exception, e:
print "Exception:",e
return False
Kinda long, huh?


Second Messenger ™ 
