from ahk import AHK
from ahk.window import Window
from ahk.keys import Key
import random, time
ahk = AHK()
rswin = ahk.win_get(title='RuneScape')
print("\n\n\n\n", rswin )
#left = Key(key_name='Left')
#rswin.activate()
while True:
rswin.send('{Left}',press_duration=random.uniform(200,1000)) #time is in miliseconds
time.sleep(random.uniform(30,100))