-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegration.py
More file actions
20 lines (16 loc) · 776 Bytes
/
integration.py
File metadata and controls
20 lines (16 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os, psutil
file = "test"
def run():
if "fceux64.exe" in (i.name() for i in psutil.process_iter()): os.system("taskkill /f /im fceux64.exe")
os.system(r'"D:\! various files\python\twitch bot doodads\lua fceux.bat"')
def play(pause=-1, start=1, stop_movie=True):
j = open(r"D:\! various files\python\twitch bot doodads\gizmo.lua").readlines()
j[3] = f'movie.load("{file}.fm2",true)\n'
j[5] = f"normal_speed_frame={start}\n"
j[6] = f"pause_frame={pause if pause > 0 else 'movie.length()'}\n"
j[7] = f"stop_movie={'true' if stop_movie else 'false'}\n"
with open(r"D:\! various files\python\twitch bot doodads\gizmo.lua","w") as lua:
lua.writelines(j)
run()
def frame(frame: int):
play(frame, frame - 1)