{"id":698,"date":"2008-10-15T02:00:31","date_gmt":"2008-10-15T10:00:31","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/2008\/10\/15\/primalscript-did-you-know-about-alt-x\/"},"modified":"2008-10-15T02:00:31","modified_gmt":"2008-10-15T10:00:31","slug":"primalscript-did-you-know-about-alt-x","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2008\/10\/15\/primalscript-did-you-know-about-alt-x\/","title":{"rendered":"PrimalScript: Did you know about Alt-X?"},"content":{"rendered":"<p>In the versions of <a href=\"http:\/\/www.primalscript.com\" target=\"_blank\">PrimalScript<\/a> that support PowerShell, you&#8217;ve likely executed your PowerShell scripts completely within the editor. You can configure the editor to capture the output to a tab or to new PowerShell session. But did you know you don&#8217;t have to run the entire script?<\/p>\n<p>Often when developing PowerShell script, you may want to try a single PowerShell expression, or perhaps a short section. In Primalscript 2007 highlight the PowerShell commands you want to execute and press Alt-X. Only those lines of PowerShell code will be executed and output captured. <\/p>\n<p>One thing to be aware of, as I always forget, is to grab all the lines of code you need. For example, I might set a variable at the beginning of the script and then want to test a few lines toward the end of the script. If I just grab the last few lines, I&#8217;ll get an error.&nbsp; Just remember to either temporarily copy the lines to the same section of the script, or comment out the intermediate lines you don&#8217;t want to execute.<\/p>\n<p>If you need a copy of PrimalScript to see for yourself, download a 45-day evaluation copy from Primalscript.com. Remember you&#8217;ll need at least PrimalScript 2007 Professional for PowerShell support.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the versions of PrimalScript that support PowerShell, you&#8217;ve likely executed your PowerShell scripts completely within the editor. You can configure the editor to capture the output to a tab or to new PowerShell session. But did you know you don&#8217;t have to run the entire script?<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2,283],"tags":[28,37,191,1001],"class_list":["post-698","post","type-post","status-publish","format-standard","hentry","category-general","category-howto","tag-powershell","tag-primalscript","tag-sapien","tag-tip"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=698"}],"version-history":[{"count":0,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/698\/revisions"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}