McRogueFace/tests/demo/screens/navigation_screenshot.py

18 lines
511 B
Python
Raw Permalink Normal View History

2026-02-09 08:15:18 -05:00
# navigation_screenshot.py - Take screenshot of navigation demo
import mcrfpy
from mcrfpy import automation
import os
# Change to the correct directory for the demo
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Run the navigation demo
exec(open('navigation_demo.py').read())
# Take a screenshot after a brief delay
def take_shot(rt):
automation.screenshot('../screenshots/navigation_demo.png')
print('Screenshot saved!')
mcrfpy.exit()
timer = mcrfpy.Timer('screenshot', take_shot, 500)