workflows

Latest

  • Authors rejoice! Pages for iOS now does a better job round-tripping to MS Word

    by 
    Steve Sande
    Steve Sande
    11.27.2013

    One of the very few remaining reasons why I don't go all "Ticci" and do all of my writing on the iPad is that when I'm writing books for traditional publishers, they have a tendency to get queasy with anything that isn't written in Microsoft Word. Since they also like to keep an eye on what changes authors are making to documents, change tracking has to be turned on in Word all the time. So in the past, the vast majority of my offline writing has been done in Word on a Mac just to keep those publishers happy. Not any more. Through a happy experiment this morning, I found that Pages (for both Mac and iOS) now does a much better job of round-tripping with Word. That's the term for shifting a document back and forth between different applications on different platforms, hopefully without too many formatting changes happening in the process. So here's my workflow: Open Word document from editor in Pages (currently version 5.0.1) on the Mac Turn on change tracking in Pages (Edit > Turn On Tracking) Save Pages document to iCloud Open Pages document on the iPad or iPhone Make sure change tracking is turned on (tap the "Wrench" button, then make sure the change tracking button is green [on]) Work on the document anywhere at any time, and changes are auto-saved to iCloud Once back on the Mac, open the document in Pages on the Mac Export as Word .doc or .docx Sure, it would probably be a lot easier for me to just do the editing on my MacBook Pro, but it weighs more than my iPad Air or iPhone and it's owned by my employer, so it's probably not a good idea to work on a side project on it... Is this a perfect solution? No. My book editor came back almost immediately saying that the tables in one chapter weren't formatted properly, so I'll need to fix them in Word before shipping the files off. But other than that, it's comforting to know that I can now do this work on an iPad or even an iPhone (see title image) from basically anywhere. If you're doing any round-tripping between iWork for iOS or Mac and Microsoft Office, what problems are you running into? Do the current versions of Pages, Keynote and Numbers work better for you for round-tripping than they used to? Let us know in the comments.

  • Triggering AppleScripts from Calendar Alerts in Mountain Lion

    by 
    Ben Waldie
    Ben Waldie
    03.18.2013

    AppleScripts are great tools for increasing your daily productivity. They're even better when they can be set to run unattended, at night, on weekends or during downtime. In Lion, iCal included a handy option for attaching a script to a calendar event. Just create an event, add a Run Script alarm, point it to the desired script and you're good to go. Things changed in Mountain Lion, though. Presumably for security reasons, the Run Script alarm option was removed from the Calendar app. Despite its removal, however, there are still some ways you can trigger scripts from Calendar events. iCal event alarm choices in OS X 10.7 Lion Calendar event alarm choices in OS X 10.8 Mountain Lion Use Automator to Trigger Your AppleScript Although Apple removed the Run Script alarm option in the Calendar app, Automator's ability to save Calendar Alarm workflows wasn't removed. And, since Automator workflows can trigger AppleScripts, they offer a quick and easy workaround for scheduling scripts. Start by launching Automator and creating a new Calendar Alarm workflow. To schedule an Automator workflow, choose the Calendar Alarm template. To Trigger an AppleScript App If your script is an app, you just need to set the workflow to launch it. Add the Launch Application action to the workflow. From the application popup menu, choose Other... and navigate to your saved AppleScript app. The Launch Application action can be used to launch an AppleScript app. To Trigger AppleScript Code If you'd rather not create an app (an app + your Automator workflow means more files to manage), you can embed compiled AppleScript code right within your workflow. Find the Run AppleScript action and drag it to the workflow. Then, insert the desired script code into the action. The Run AppleScript action can be set to run code embedded in your Automator workflow. To Schedule the Script Once you've got your workflow configured, go ahead and save it. Automator automatically adds it to an Automator calendar (which is created if it doesn't exist yet) in the Calendars app. An Open File alarm is added to the event and set to run the workflow. Now, adjust the start date of the event as needed, put it on a repeating schedule, etc. Open File alarms are used to trigger Automator Calendar Alarm workflows. Use AppleScript to Create a Scheduled Event If you create an event in the Calendars app and add an Open File alarm, you should find that you're unable to select a saved AppleScript app. You can select a compiled AppleScript file, but this is essentially useless because when the event triggers, the Open File alarm simply causes the compiled script to open in AppleScript editor. Not what you need. What you really need is to open a saved script app. AppleScript to the rescue. To work around the limitation, just run the following script. It asks you to select a saved AppleScript app. It then creates an event at the current date and time on an AppleScripts calendar, which it creates if it doesn't exist already. The script then adds an Open File alarm to the newly created event and sets it to open your selected script app. Yep, that's right. Although you can't manually set an event to open a saved AppleScript app, you can script the process. NOTE: You can download the complete script below here. So, there you go. A number of workarounds for triggering scripts from Calendar events in Mountain Lion. So, schedule away! Happy Scripting!

  • More Tips for Troubleshooting Automator Workflows

    by 
    Ben Waldie
    Ben Waldie
    03.11.2013

    In my last post, I shared some useful tips for troubleshooting Automator workflow problems. I didn't cover everything, though. There are lots of other ways you can troubleshoot your workflow. Here are some more tips to help. 1. Use Get Selected Finder Items Wisely Automator workflows are frequently created to process files and folders. When you save a workflow as an application, you can drag files and folders onto it and they're passed right into the workflow for processing. Other types of workflows behave similarly. Save a Folder Action workflow, for example, and every time new items are added to the folder, they're automatically passed to the workflow for processing. At the top of a workflow, Automator tells you if it receives files and folders as input. From time to time, however, you may notice that your workflow has processed your files twice, or that it's encountered some kind of obscure error. Often, this is due to the presence of a Get Selected Finder Items action at the beginning of the workflow. As enticing as its name sounds, the Get Selected Finder Items action isn't always needed to process files and folders. Remember, depending on the type of workflow you built, those items may be passed automatically to your workflow. In these cases, the inclusion of the Get Selected Finder Items action causes the dropped items to be appended to themselves. This can result in the items being processed twice or an error. So, what's the solution? Just try removing the Get Selected Finder Items action from the beginning of your workflow. Many times, that one simple change fixes the problem. Don't insert the Get Selected Finder Items action at the start of a workflow if your workflow already receives Finder items as input. 2. Finding Missing Output Files Imagine this. You run an Automator workflow that takes a PDF and outputs its pages as images. The only problem is that the images never seem to show up. Sound familiar? If you've ever been unable to find files output by a workflow, it may not necessarily mean that your workflow failed. Those files may actually be buried somewhere on your system. This is because some Automator actions generate their output files in hidden temporary folders. The Render PDF Pages as Images action is one example. It extracts the pages of a PDF as image files, gives them unique names, and saves them into a hidden temp folder. Render PDF Pages as Images sneakily outputs files to a hidden folder. Note that it doesn't have an option to select an output folder. To determine whether this has happened, run your workflow in Automator. Then, open the action's Results area. If there are files or folders listed, you should be able to figure out where they're located by viewing them in list view. An action's Results area tells you if an action really produced a result. To output the files or folders to the desired location, just insert a Move Finder Items action into your workflow. This should move the items from their secret location to the Desktop or wherever else you choose. Use the Move Finder Items action to move hidden output files someplace more useful. 3. Improving Recorded Task Playback A great feature of Automator is its ability to record things you do manually, so you can play them back later as part of your workflow. A not so great feature of Automator is its knack for being unable to play back what it records. There are a number of reasons this can happen, and some options for fixing things. You may have made a mistake while recording. Remember, Automator is watching. So, it picks up your mistakes too. If this happens, try selecting the extra steps in the Watch Me Do action Automator adds to the workflow. Then, press the Delete key to remove them. You can remove recorded steps by selecting and deleting them. You may have moved too fast, and Automator couldn't keep up. It may have missed some of what you did. You can try to resolve the problem by recording the steps again. This time, take your sweet time. Automator may be unable to repeat what you did manually. Unfortunately, Automator can't access everything in OS X. It can access a lot, but not everything. If this happened, consider trying a third-party macro utility, such as iKey. It may have greater reach than Automator. 4. Locating Missing Actions If you've ever launched Automator but have been unable to locate an action that you used in the past, it may not mean that action is entirely gone from your Mac. Automator may just be unable to load it for some reason. For example, maybe the app the action works with isn't installed anymore. You can see what Automator is unable to load by checking the Console app (in /Applications/Utilities). Just open it up, launch Automator, and see what shows up in the Console. The Console app tells you what actions Automator can't load. Here, the Entourage actions weren't loaded because I don't have Entourage installed anymore. I now have Outlook installed. 5. Service Workflows Not Triggering? Have you created service workflows, but when you trigger them, they don't seem to run? Give them some time. For whatever reason, they may take some time to get going. After one has run, however, subsequent service workflows should run a bit faster. You may have also noticed that you can assign keyboard shortcuts to Service workflows. If you haven't noticed this, you can do it in System Preferences > Keyboard > Keyboard Shortcuts. Assigning a keyboard shortcut to a Service workflow Once you've assigned a keyboard shortcut, you may have found that the workflow doesn't run when you press the keyboard shortcut. One possible fix is to manually choose the workflow from the application's Services menu. Then, once it's been triggered for the first time, the keyboard shortcut often starts working again. Hopefully, these tips and my prior tips have put you on the path to more stable and reliable workflows. Good luck and Happy Scripting!

  • Where Automator Actions and Workflows Live

    by 
    Ben Waldie
    Ben Waldie
    12.17.2012

    Automator's great for streamlining some of the repetitive things you do each day on your Mac. With Automator, you can create your own custom plugins for the Services menu, Folder Action workflows that run when files are placed into a folder, add-ons for the print window's PDF menu, and more. In most cases, when you save a workflow, Automator puts it where it needs to go automatically. But, where do your workflows actually live? If you want to remove or edit one, you'll need to know. In this post, we'll take a look at the various places workflows are found on your Mac. Actions Before exploring the different resting places for workflows, let's discuss actions. Actions are the building blocks of your workflows. To use them, they need to be installed somewhere Automator can find them. There are four places actions can reside on your Mac: Apps - Often, an app that supports Automator contains embedded actions. When Automator launches, it scans the apps on your Mac, loads their actions (if they have any), and displays them in the action library. Aperture is an app that contains embedded Automator actions /System/Library/Automator - This is where Apple puts all of the standard actions that come with OS X, such as actions for Calendar, Mail, and Safari. /Library/Automator - Here, you may find some non-embedded third-party actions. The Microsoft Office actions, for example, are installed here. Actions in this folder are available to all user accounts on your Mac. ~/Library/Automator - If you double-click action files you've downloaded or choose File > Import Actions... in Automator, the actions are installed here automatically. These actions are available to you, but not to other users on your Mac. Actions are installed into one of the three /Library/Automator folders Note: To access the Library folder in your home directory, press Option and choose Go > Library from the Finder's menu bar. Workflows Automator's template chooser panel gives you lots of choices when creating workflows Automator allows you to construct workflows in a variety of formats, each of which has its own benefits and use cases. When you build a workflow, you choose the most appropriate format for your needs. Then, when you save the workflow, Automator either asks you to choose an output folder, or it saves it automatically into a specific location based on the workflow's format. Applications Automator workflow applications are just like other apps. You double-click them and they run. When you save a workflow as an application, Automator allows you to choose its location. You can put it anywhere, such as your Applications folder, Documents folder, etc. Once saved, you can even drag it to your Dock for quick access. Workflows A workflow file is a saved Automator document. Double-click it to open it in Automator for editing. Like applications, workflow files can be saved anywhere you wish. Calendar Alarms A Calendar alarm workflow is a specifically configured application, that is intended to be run from a Calendar event's alarm at a scheduled date and time. These types of workflows are saved into the ~/Library/Workflows/Applications/Calendar folder in your home directory. A Calendar Alarm workflow is configured to run from an Open File alarm Automator installs Calendar alarm workflows into your ~/Library/Workflows/Applications/Calendar folder Services Service workflows appear in the Services menu and contextual menus throughout OS X. They're typically used to perform some automated function on selected text, files, images, and more. These types of workflows are saved into the ~/Library/Services folder in your home directory. You can move a saved Service into the /Library/Services folder to make it accessible to all users on your Mac. Service workflows appear in the Services menu and contextual menus throughout OS X Service workflows are saved into the ~/Library/Services folder Service workflows can also be enabled/disabled or be assigned to hot keys in System Preferences, under Keyboard > Keyboard Shortcuts > Services. System Preferences provides a place to manage your service workflows Print Plugins Print plugins appear in the PDF menu of the print dialog throughout OS X. They're used to process printed PDFs. For example, you might create a print plugin that renames a printed PDF and uploads it to your FTP server. These workflows are installed into the ~/Library/PDF Services folder in your home directory. Like Services, you can move print plugins into the /Library/PDF Services folder in order for all users of your Mac to access it. Print plugin workflows show up in the print window's PDF menu throughout OS X Print plugin workflows are saved in the ~/Library/PDF Services folder Folder Action Workflows Folder actions are workflows that are attached to folders and configured to run when new files are placed into the folder. Folder actions are saved into the ~/Library/Workflows/Folder Actions/ folder in your home directory. Folder actions can be configured using the Folder Action Setup app, which you can access by Control+Clicking on a folder and choosing Services > Folder Action Setup. You can access Folder Actions Setup via the Finder's contextual menu Folder Action Setup allows you to enable, disable, and edit Folder Action scripts and workflows Image Capture Plugins Image Capture plugins are workflows that appear in the Image Capture app. They can be configured to run to process images as you're downloading them from a camera. For example, you might make an Image Capture plugin that adds copyright metadata to your images, backs them up to an offsite server, and then imports them into iPhoto automatically as they are downloaded. Image Capture plugins are saved into the ~/Library/Workflows/Image Capture folder in your home directory. Image Capture plugins can be set to process your downloaded camera images Script Menu Workflows Finally, although Automator doesn't presently include an option for saving workflows in the OS X script menu, you can place them there yourself. Just save your workflow as a Workflow file or application and move it into the ~/Library/Scripts or /Library/Scripts folder. The script menu offers a nice location for organizing and gaining quick access to scripts and workflows. You can turn on the script menu in the preferences window of AppleScript Editor in /Applications/Utilities. The script menu in OS X also allows you to run Automator workflows You enable the system-wide script menu in AppleScript Editor's preferences window So, now you should have a pretty good handle on where your various Automator workflows reside. If you're still getting started with Automator, this information will no doubt come in handy soon, as you follow along with some of my future posts.

  • Mac Automation: Creating Watch Me Do workflows

    by 
    Cory Bohon
    Cory Bohon
    01.19.2009

    Do you want to use Automator's powerful features, but don't want to worry with "programming" the usefulness each and every time you wish to perform an action? With Automator for Leopard, you have the ability to easily record mouse moves/clicks and keyboard input with a feature called "Watch Me Do." Initial SetupBefore using this Automator feature, you will need to turn on "Access for assistive devices." So head over to System Preferences > Universal Access. Make sure the checkbox is checked beside "Enable access for assistive devices." This allows Automator to control your mouse and keyboard movements/clicks/key presses. Watch Me Do will not work unless this box is checked. Recording an Action in AutomatorYou are now ready to start recording your first Watch Me Do action in Automator. This feature gives Automator additional functionality if a prebuilt action is not readily available. So, before you go creating your own Watch Me Do action, look through the action list to make sure the functionality doesn't already exist. When you are ready to record, press the "Record" button in the top-right corner of the window. The main Automator window will disappear, and you will see a heads-up display on the screen showing that Automator is recording; this display will also have a stop button -- when you are done recording your actions, you press this to return to the main Automator window. While recording, any mouse movements/clicks and key presses will be captured and added to your workflow. Managing your recorded eventsEach time you click, press a key, or move the mouse, you create an "event." Once you have recorded your Watch Me Do actions, you can reorder the specific events of the action. Just click and drag in the "Events" section. Be careful though, as some rearrangements can render the action workflow useless (i.e. reordering a click of a button before a specific dialog is displayed). In the Watch Me Do action, you can also select a Timeout in seconds, and set the playback speed. Before changing these settings, note the defaults: Timeout is set to 0 seconds, and Playback Speed is set to 1x. Read on to learn about running, saving, and get some tips about recording.

  • Automation on the Mac

    by 
    Cory Bohon
    Cory Bohon
    12.14.2007

    Welcome to the first of many AppleScript and Automator "how-tos." These tips are mostly geared toward Mac users who may know a little AppleScript, but want to learn more. If you've never opened Script Editor or Automator these tips will also help you get up to speed. First things first, what the heck is AppleScript? It is an easy-to-use and easy-to-learn programming language. AppleScript was created in the early 90s as a simple way for people to create their own custom automation programs. This is one of the reasons the Mac remains popular in the printing and creative industry, where users can take large work flows and automate them relatively quickly.