{"id":109,"date":"2022-12-12T08:39:32","date_gmt":"2022-12-12T16:39:32","guid":{"rendered":"https:\/\/dejal.com\/blog\/?p=109"},"modified":"2022-12-12T08:39:32","modified_gmt":"2022-12-12T16:39:32","slug":"simon-script-example-show-screenshot","status":"publish","type":"post","link":"https:\/\/dejal.com\/blog\/simon-script-example-show-screenshot\/","title":{"rendered":"Simon script example: Show &#038; Screenshot"},"content":{"rendered":"<body><p><\/p>\n<p>One of the major strengths of <a href=\"https:\/\/dejal.com\/simon\/\">Simon<\/a>, my website and server monitoring tool, is the flexibility it offers through the ability to write custom scripts in many scripting languages. Simon is plenty useful with the built-in services, filters, and notifiers, but the ability for customers to enhance it themselves makes it even better.<\/p>\n<p>There are several script-based services, filters, and notifiers built in to the app, and others can be downloaded from the <a href=\"https:\/\/dejal.com\/simon\/extras\/\">Simon Extras page<\/a>.<\/p>\n<p>One such example is the <a href=\"https:\/\/dejal.com\/simon\/extras\/ds-show+screenshot.zip\">Show &amp; Screenshot<\/a> notifier script (click that link to download it). To install it, go to the <strong>Notifiers<\/strong> page in Simon, add a new notifier, choose <strong>Script<\/strong> for the notifier kind, click the <strong>Open Script\u2026<\/strong> button, and choose the downloaded script.<\/p>\n<p>This script simply opens the page in the default web browser, waits a few seconds for the page to render, then takes a screenshot of it. By default it\u2019ll wait 10 seconds, and save to the Desktop, but you can customize those values; enter the path of a folder to save them to (the folder must already exist). Also specify how long to wait before performing the screenshot, in seconds:<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" title=\"Browser screenshot\" src=\"https:\/\/i0.wp.com\/dejal.com\/blog\/wp-content\/uploads\/2022\/12\/browser-screenshot.png?resize=1023%2C540&#038;ssl=1\" alt=\"Browser screenshot\" width=\"1023\" height=\"540\" border=\"0\" loading=\"lazy\"><\/p>\n<p>And of course to use the notifier, specify it in the <strong>Notifiers<\/strong> page of a test:<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" title=\"Use notifier\" src=\"https:\/\/i0.wp.com\/dejal.com\/blog\/wp-content\/uploads\/2022\/12\/use-notifier.png?resize=779%2C169&#038;ssl=1\" alt=\"Use notifier\" width=\"779\" height=\"169\" border=\"0\" loading=\"lazy\"><\/p>\n<p>Note that when this notifier is first used, macOS will ask for permission to capture the screen; until you grant that, it\u2019ll capture an empty desktop.<\/p>\n<p>Check out the  <a href=\"https:\/\/dejal.com\/simon\/extras\/\">Simon Extras page<\/a>\u00a0for other scripts.\u00a0And if you create a useful script for Simon, please <a href=\"https:\/\/dejal.com\/contact\/?prod=simon&amp;subj=Simon+script&amp;ref=blog\">share it with others<\/a>!<\/p>\n<p><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>One of the major strengths of Simon, my website and server monitoring tool, is the flexibility it offers through the ability to write custom scripts in many scripting languages. Simon is plenty useful with the built-in services, filters, and notifiers, but the ability for customers to enhance it themselves makes it even better. There are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16,4],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-faq","category-simon"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":1,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}