{"id":1341,"date":"2017-04-18T20:55:13","date_gmt":"2017-04-18T20:55:13","guid":{"rendered":"http:\/\/scunster.co.uk\/?p=1341"},"modified":"2017-04-22T10:23:01","modified_gmt":"2017-04-22T10:23:01","slug":"create-an-amiga-script-and-run-it-from-shell-or-within-workbench","status":"publish","type":"post","link":"https:\/\/scunster.co.uk\/?p=1341","title":{"rendered":"Create an Amiga script and run it from shell or within Workbench"},"content":{"rendered":"<p>Open your favourite editor such as JanoEditor or if using Classic Workbench, right click on the Workbench background and choose new &gt; script<br \/>\n<a href=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/JanoEditor.zip\">Download JanoEditor<\/a> or get <a href=\"http:\/\/aminet.net\/package\/text\/edit\/JanoEditor\" target=\"_blank\">JanoEditor from Aminet<\/a><\/p>\n<p><a href=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_1-1024x618.png\" alt=\"\" width=\"510\" height=\"308\" class=\"alignnone size-large wp-image-1347\" srcset=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_1.png 1024w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_1-300x181.png 300w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_1-768x464.png 768w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>Lets create a simple script that will exit after 3 seconds<br \/>\nType the following<\/p>\n<pre>Echo This will close after 3 seconds\r\nwait 3 secs\r\nquit<\/pre>\n<p><a href=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_2-1024x621.png\" alt=\"\" width=\"510\" height=\"309\" class=\"alignnone size-large wp-image-1346\" srcset=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_2.png 1024w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_2-300x182.png 300w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_2-768x466.png 768w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>Once you have written your script, save it.<\/p>\n<p><a href=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_3-1024x617.png\" alt=\"\" width=\"510\" height=\"307\" class=\"alignnone size-large wp-image-1345\" srcset=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_3.png 1024w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_3-300x181.png 300w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_3-768x463.png 768w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>We need to make the script executable, locate the script in Workbench and right-click it and choose &#8220;Info&#8221;<\/p>\n<p><a href=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_4-1024x619.png\" alt=\"\" width=\"510\" height=\"308\" class=\"alignnone size-large wp-image-1344\" srcset=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_4.png 1024w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_4-300x181.png 300w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_4-768x464.png 768w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>Now click on the &#8220;Protection bits&#8221; TAB<br \/>\nMake sure that &#8220;Script&#8221; and &#8220;executable&#8221; are both ticked, and then click SAVE<br \/>\nYou will be asked to if you want to create an ICON, just click YES, you can change this later.<\/p>\n<p><a href=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_5.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_5-1024x621.png\" alt=\"\" width=\"510\" height=\"309\" class=\"alignnone size-large wp-image-1348\" srcset=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_5.png 1024w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_5-300x182.png 300w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_5-768x466.png 768w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>Your script will now run if you load the shell, navigate to its folder \/ drawer and run it by name.<br \/>\nThis will run the &#8220;myscript&#8221; script saved to the &#8220;RAM drive&#8221;.<\/p>\n<pre>workbench:&gt;ram:\r\nRam Disk:&gt;myscript<\/pre>\n<p>If you want your script to execute in Workbench when you click on it, do the following.<br \/>\nRight click on the script and choose &#8220;Info&#8221;, then Under the Information Tab change the Default Tool: to iconX<br \/>\nPress ENTER after typing iconX, then choose SAVE<br \/>\nNow double-click your script and it will run.<\/p>\n<p><a href=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_6.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_6-1024x619.png\" alt=\"\" width=\"510\" height=\"308\" class=\"alignnone size-large wp-image-1349\" srcset=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_6.png 1024w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_6-300x181.png 300w, https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/amiga_script_6-768x464.png 768w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>Use iconmaster as an easy way to change your scripts icon.<br \/>\n<a href=\"https:\/\/scunster.co.uk\/wp-content\/uploads\/2017\/04\/IconMaster.zip\">Download Here<\/a> or get it <a href=\"http:\/\/aminet.net\/package\/util\/wb\/IconMaster\" target=\"_blank\">from aminet<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Open your favourite editor such as JanoEditor or if using Classic Workbench, right click on the Workbench background and choose new &gt; script Download JanoEditor or get JanoEditor from Aminet Lets create a simple script that will exit after 3 seconds Type the following Echo This will close after 3 seconds wait 3 secs quit [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[295],"tags":[297,339,337,338,105,96,303],"class_list":["post-1341","post","type-post","status-publish","format-standard","hentry","category-amiga","tag-amiga","tag-double-click","tag-execute","tag-run-from","tag-script","tag-shell","tag-workbench"],"_links":{"self":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1341"}],"version-history":[{"count":12,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1341\/revisions"}],"predecessor-version":[{"id":1377,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1341\/revisions\/1377"}],"wp:attachment":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}