I want to do this: take a screenshot of AM and then load it as an image file.
I can easily write a routine that scans through the AM folder and selects the last screenshot pathname. My idea was to do something like, in a on_signal routine:
generate the screenshot through signal("screenshot")
run through the folder and get the filename
add the filename to the image
The issue is that, as far as I can see, it takes some time to create the screenshot so the routine finds the previous one. Is there a way to wait until the intended file is created?