Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Controlling ScreenShots
-
Have you actually added anything in the UI editor?
-
... no
-
@omz What would I add
-
reefboy1: what do you want to take screenshots of?
-
@0942v8653 anything for now
-
Any suggestions?
-
The workflow app lets you delete screenshots
-
@dalacv I'm not trying to delete them, I'm trying to Make them. I also would like to use pythonista built in functions, not workflows
-
Step by step:
- Create a new "Script with UI"
- In the script part, paste the code above
- In the UI part, add some elements (e.g. an ImageView etc.)
- Add a button to the UI, open the inspector ("i" button) and set its
action
attribute toscreenshot_action
. - Run the script, tap the button you added, the screenshot should appear in the console
Note that this will only make a screenshot of the UI you created yourself. As I said, it's not terribly useful, not what you actually wanted, and you can't make a screenshot of the entire app, your homescreen or whatever else this way...
-
@omz thank you so much. I love your apps.
-
Ok my last question is: When I hit the button is it possible to make the devise keep taking screenshots until I click it again?
-
Clicking the button saves three screenshots to the local directory.
This script builds its UI at runtime so it requires no .pyui file.
https://github.com/cclauss/Pythonista_ui/blob/master/ScreenshotView.py
-
Ok cool, thanks
-
@ccc when I run your script nothing happens, it just shows the console screen
-
When I click the button is it possible to take the screenshot 3 times in 1 click???
-
Use the Pythonista file picker to view the image files:
Screenshot_[timestamp].png
. Three are created for every click the button so you probably have a pile of them by now. I updated the gist code to print out the filenames as they are created.