{"id":211,"date":"2006-10-19T14:30:37","date_gmt":"2006-10-19T21:30:37","guid":{"rendered":"http:\/\/www.red-sweater.com\/blog\/211\/start-routine-at-login"},"modified":"2006-10-19T14:36:20","modified_gmt":"2006-10-19T21:36:20","slug":"start-routine-at-login","status":"publish","type":"post","link":"https:\/\/redsweater.com\/blog\/211\/start-routine-at-login","title":{"rendered":"Start Routine At Login"},"content":{"rendered":"<p>Luis over at <a href=\"http:\/\/www.happyapps.com\/\">Happy Apps<\/a> is heavy in to the FlexTime habit, and asked me if I would consider adding a feature such that routines would automatically start as soon as they are opened. Why? Because he uses his FlexTime &#8220;break reminder&#8221; routine every day, and has FlexTime set to open up as part of his &#8220;Login Items&#8221; list. But he still has to remember to click the &#8220;Run&#8221; button before he gets started with his work.<\/p>\n<p>\nI think some kind of &#8220;auto-start&#8221; idea is good, but I suggested a workaround that should work in the mean-time. By using FlexTime&#8217;s scripting mechanism to both open and start a routine, anybody can build a &#8220;routine starter&#8221; applet and keep it handy for this type of use.\n<\/p>\n<p>\nOpen Script Editor, and paste in the following script:\n<\/p>\n<p><pre>\ntell application \"FlexTime\"\n  open \"\/Users\/daniel\/Documents\/Break Reminder.flextime\" as POSIX file\n  set running of document 1 to true\nend tell\n<\/pre>\n<\/p>\n<p>\nYou&#8217;ll have to edit the path to match the routine you want to run, of course. Now select &#8220;Save As&#8221; from the File menu in Script Editor, and select &#8220;Application Bundle&#8221; from the File Format popup menu:\n<\/p>\n<p>\n<img decoding=\"async\" src=\"http:\/\/www.red-sweater.com\/blog\/images\/AppBundle.png\"\/>\n<\/p>\n<p>\nSave the script application wherever you like. For instance, you could just pop it into your applications folder.\n<\/p>\n<p>\nNow open up Login Items from the &#8220;Accounts&#8221; pane in System Preferences. Drag the resulting script application right into the list:\n<\/p>\n<p>\n<img decoding=\"async\" src=\"http:\/\/www.red-sweater.com\/blog\/images\/StartBreakReminderList.png\"\/>\n<\/p>\n<p>\nNow whenever you login in to your computer, the selected routine will start automatically. If you want to start several routines at once, just edit the script to add more &#8220;open&#8221; and &#8220;set running of document 1&#8221; lines.\n<\/p>\n<p>\nThis same technique can be used to add &#8220;Routine Starters&#8221; to the sidebar in the Finder, or the Dock. Just drag the resulting script application in and it will always be available to you.\n<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Luis over at Happy Apps is heavy in to the FlexTime habit, and asked me if I would consider adding a feature such that routines would automatically start as soon as they are opened. Why? Because he uses his FlexTime &#8220;break reminder&#8221; routine every day, and has FlexTime set to open up as part of [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-211","post","type-post","status-publish","format-standard","hentry","category-flextime"],"_links":{"self":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/comments?post=211"}],"version-history":[{"count":0,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/211\/revisions"}],"wp:attachment":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/media?parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/categories?post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/tags?post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}