1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-25 02:32:19 -05:00
Simba/Projects/libmml/pymml/mml/__main__.py

39 lines
833 B
Python
Raw Normal View History

2010-12-01 15:38:20 -05:00
from __init__ import *
if __name__ == '__main__':
DLL = MMLCore('../libmml.so')
client = DLL.dll.create_client()
print 'Python Client: %d' % client
if client in (0, 1):
raise Exception('Could create a client');
c = Color(DLL, client)
ret = c.find((0, 0, 100, 100), 0)
print ret
2010-12-25 19:25:25 -05:00
ret = c.find_all((0, 0, 100, 100), 0, tol=100)
2010-12-01 15:38:20 -05:00
print ret
m = Mouse(DLL, client)
print m[(Mouse.Pos, Mouse.Left, Mouse.Right)]
m[(Mouse.Pos, Mouse.Right)] = ((300,300), True)
print m.getButtonStates()
sleep(0.5)
m.setPos((200,200))
sleep(2)
print 'Done'
m[(Mouse.Left, Mouse.Right, Mouse.Middle)] = [False for x in range(3)]
for v in zip((Mouse.Left, Mouse.Right), m[(Mouse.Left, Mouse.Right)]):
print v
print m.getPos()
del DLL