# Take screenshots for windows that are not open

**URL:** <https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409>\
**Category:** Ignition\
**Created:** [March 19, 2018, 8:17am UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409 "2018-03-19T08:17:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![haythem-khalfaoui](https://avatars.discourse-cdn.com/v4/letter/h/3da27b/32.png) [@haythem-khalfaoui](https://forum.inductiveautomation.com/u/haythem-khalfaoui)\
**Post date:** [March 19, 2018, 8:17am UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/1 "2018-03-19T08:17:36Z")

</div>

Hi,  
I want to make a screenshot for windows that are not open, the objective of this script is to see the window before opening it. Can you help me please

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 19, 2018, 12:49pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/2 "2018-03-19T12:49:24Z")

</div>

I would not expect this is possible. If you need something like this at runtime, you will probably have to open every window in the designer to build a complete set of static images. With a bunch of scripting to display them in a popup frame.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [March 19, 2018, 9:36pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/3 "2018-03-19T21:36:50Z")

</div>

Will a screenshot of the window the last time it was saved be sufficient? If so, here is a video of something I built to do just that.

[https:/uploads/iatesting/original/2X/3/3890c9b58dd7de64d482ed4dec528122e15b1298.mp4](https:/uploads/iatesting/original/2X/3/3890c9b58dd7de64d482ed4dec528122e15b1298.mp4)

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [March 19, 2018, 9:40pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/4 "2018-03-19T21:40:59Z")

</div>

That’s cool, how’d you do that? Looks like you’re grabbing whatever the designer uses to get that little preview thumbnail, right?

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [March 19, 2018, 9:41pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/5 "2018-03-19T21:41:56Z")

</div>

Here ya go, some python magic!!

[get window template.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/929a5ae85cfa2867f1d74bb22d6ba4e4434dbe90.proj) (7.0 KB)

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [March 19, 2018, 9:55pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/6 "2018-03-19T21:55:22Z")

</div>

Nice, that’s my favorite kind of magic too. Good stuff there.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 19, 2018, 11:18pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/7 "2018-03-19T23:18:15Z")

</div>

Very good stuff, indeed!

---

<div class="post-metadata">

**Author:** ![bhastie](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@bhastie](https://forum.inductiveautomation.com/u/bhastie)\
**Post date:** [April 11, 2018, 10:27pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/9 "2018-04-11T22:27:21Z")

</div>

Kyle, I can’t see the video and the project file throws an error “premature end of file” when I try to import. Is it possible to post a code snippet?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 11, 2018, 11:00pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/10 "2018-04-11T23:00:03Z")

</div>

> [@bhastie](#):
>
> throws an error "premature end of file" when I try to import

Make sure you're on v7.9.5 or above for that project file. Or set up a temporary install of 7.9.5 that you can cut and paste from.

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [April 11, 2018, 11:35pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/11 "2018-04-11T23:35:38Z")

</div>

What I’ve done in the past was open up the project file in a text editor and change the version to match yours. Can’t claim this won’t screw things up on some differences in versions, but should be alright for this.

---

<div class="post-metadata">

**Author:** ![bhastie](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@bhastie](https://forum.inductiveautomation.com/u/bhastie)\
**Post date:** [April 12, 2018, 3:22pm UTC](https://forum.inductiveautomation.com/t/take-screenshots-for-windows-that-are-not-open/17409/12 "2018-04-12T15:22:05Z")

</div>

Thanks, that did the trick.
