-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Description
Discussed in #225
Originally posted by MIFIKUS August 14, 2023
Hello!
I made an ahk script for Lineage 2M. And during the script works i get Cannot open console input buffer for writing.
It apperars absolutely randomly.
My code looks like this.
if action == 'move':
move = f'''\
#MaxThreads 20
CoordMode, Mouse, Screen ;
DllCall("SetCursorPos", int, {x}, int, {y})
Sleep, 120
Exit
'''
while autohotkey.get_mouse_position(coord_mode='Screen') != (x, y):
autohotkey.run_script(move)
time.sleep(0.9*MULTIPLIER)
return
elif action == 'click':
click = '''\
#MaxThreads 20
SendEvent {Click}
Sleep, 120
Exit
'''
autohotkey.run_script(click)
time.sleep(0.9*MULTIPLIER)
return
elif action == 'drag':
drag = f'''\
#MaxThreads 20
Click down
Sleep, 120
MouseMove, {x}, {y}, 1, {direction}
Sleep, 120
Click up
Sleep, 120
Sleep, 120
Exit
'''
autohotkey.run_script(drag)
time.sleep(0.5*MULTIPLIER)
return
elif action == 'wheel':
wheel = f'''\
#MaxThreads 20
MouseClick,WheelDown,,,1,0,D,R
Sleep, 120
Exit
'''
I tried to google this error but didn't find anything.
To set a MaxThreads and Exit from script in the end didn't help too
Metadata
Metadata
Assignees
Labels
No labels