{"id":137,"date":"2010-02-28T20:39:21","date_gmt":"2010-03-01T01:39:21","guid":{"rendered":"https:\/\/billhiggins.us\/blog\/?p=137"},"modified":"2010-03-02T09:14:20","modified_gmt":"2010-03-02T14:14:20","slug":"script-to-resize-safari-for-recording-a-youtube-hd-video","status":"publish","type":"post","link":"https:\/\/billhiggins.us\/blog\/2010\/02\/28\/script-to-resize-safari-for-recording-a-youtube-hd-video\/","title":{"rendered":"AppleScript to resize Safari for recording a YouTube HD video"},"content":{"rendered":"<p>Occasionally I need to produce <a href=\"http:\/\/youtube.com\/\">YouTube<\/a> <a href=\"http:\/\/en.wikipedia.org\/wiki\/High-definition_video\">HD<\/a> videos showing me doing something in a web browser. Up &#8217;till now I&#8217;ve had to painfully, manually resize the browser window to 1280&#215;720 so that the video didn&#8217;t get unnaturally shrunk or expanded by my screencast rendering software. Tonight I figured out a way to automatically resize my browser window to the exact dimensions using <a href=\"http:\/\/www.macosxautomation.com\/applescript\/\">AppleScript<\/a>.<\/p>\n<p>Here is the magical incantation:<\/p>\n<p style=\"padding-left: 30px;\"><strong>tell<\/strong> <em><span style=\"color: #0000ff;\">application<\/span><\/em> &#8220;Safari&#8221;<\/p>\n<p style=\"padding-left: 60px;\"><strong><span style=\"color: #0000ff;\">activate<\/span><br \/>\n<span style=\"font-weight: normal;\"><strong>set<\/strong> <strong>the<\/strong> <span style=\"color: #800080;\">bounds<\/span> <strong>of<\/strong> <strong>the<\/strong> <strong>first<\/strong> <em><span style=\"color: #0000ff;\">window<\/span><\/em> <strong>to<\/strong> {0, 0, 1280, 720}<\/span><\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><span style=\"font-weight: normal;\"><strong>end<\/strong> <strong>tell<\/strong><\/span><\/strong><\/p>\n<p>Run this application in AppleScript Editor (<code>\/Applications\/Utilities\/AppleScript Editor<\/code>) and your browser will be the perfect size for recording movies. You can save the script to a folder for later reuse.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Occasionally I need to produce YouTube HD videos showing me doing something in a web browser. Up &#8217;till now I&#8217;ve had to painfully, manually resize the browser window to 1280&#215;720 so that the video didn&#8217;t get unnaturally shrunk or expanded by my screencast rendering software. Tonight I figured out a way to automatically resize my [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,25,27,28],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-applescript","tag-mac","tag-safari","tag-tips"],"_links":{"self":[{"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":6,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/posts\/137\/revisions\/143"}],"wp:attachment":[{"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}