CRAW now runs on Windows 7 too - the problem was that Windows 7 has moved some functi...
[craw.git] / script / flash.py
blobe67228a6ed262c9dfc2c7a74128e765b02b18413
1 import craw, threading, time, utility
3 class flash_thread(threading.Thread):
4 def __init__(self, id, delay):
5 threading.Thread.__init__(self)
6 self.id = id
7 self.run_thread = True
8 self.delay = delay
9 self.start()
11 def run(self):
12 while self.run_thread:
13 flash_player(self.id)
14 time.sleep(self.delay)
16 def flash_player(id):
17 packet = '\x4b\x00\x00\x00\x00' + utility.pack_number(id, 4)
18 craw.send_packet(packet)