There is a screenshots plugin, but the following @button script seems more 
useful:

@button screen-shot @key=ctrl-1

'''
Create a screenshot of the present Leo outline and
save it to .leo/screen_captures.
'''
#  --window-size=682x1264 is recommended.
from leo.core.leoQt import isQt5, QtGui
import time
base = r'C:\Users\edreamleo\.leo\screen_captures'
assert g.os_path_exists(base), repr(base)
window = g.app.gui.qtApp.activeWindow()
w = window.grab() if isQt5 else QtGui.QPixmap.grabWindow(window.winID())
fn = '%s.png' % time.strftime('%Y-%m-%d-%H-%M-%S')
path = g.os_path_finalize_join(base, fn)
w.save(path, 'png')
g.es_print('saved: %s' % path)

This script must be bound to a keystroke so that it can run without 
disturbing Leo's present state. Rev 9cce9a in devel is required to make 
everything work smoothly when gathering arguments, but this rev breaks 
other features. Back to the drawing board.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to