25 May

Illustrator Automator Actions: Demo Available

Illustrator Automator Actions

Good news! We’ve made a trial version of Ai Actions available for download so you can give it a test drive before buying. Ai Actions gives you a set of handy Illustrator Automator Actions which you can use to create your own workflows and even apps to automate your work. And the best thing is that you don’t need to write a line of code! If you can drag and drop, you can create a workflow.

NB. The demo version contains 4 sample actions. The full version contains 18 actions.

Click here to download demo

Less donkey work, more creativity!

Lets imagine you have a hundred Illustrator artworks and you need to open each, delete any empty text frames, convert all the text to outlines and save as a JPEG and a PDF. Normally you’d have to do that by hand. Using Ai Actions and Automator you can create a workflow to do this automatically saving you heaps of time. And more importantly, letting you concentrate on the creative stuff instead of the boring donkey-work.

A simple Automator workflow using Ai Actions to automate Adobe Illustrator

A simple Automator workflow using Ai Actions to automate Adobe Illustrator

Why use Automator?

The advantage of Automator is that you can use functionality from many other apps in your workflow. So, for example, if you wanted to email the PDFs created by your workflow then you can harness the power of Mail.app to do that for you.

The trial version has only four Automator actions whereas the full version contains 18. There are some tips for getting to grips with Automator here:

Getting to grips with Automator
Creating a simple workflow with Ai Actions

Where can I get the full version?

The full version of Ai Actions is available from the Mac App Store. Get automating today!

Illustrator Actions for Automator, Automator Actions, Automator Illustrator Actions

23 May

Learning Automator

Automator is a really easy way of building workflows, apps, services and hot folders and requires little or no programming knowledge. Once you’ve mastered it, you can automate all sorts of things on your Mac to save you time and remove the drudge work.

Automator is built into every reasonably recent Mac running Mac OS X. However, few people know its there or use it… any they’re missing out! If you’d like to know more then there are some really good tutorials here:

http://www.macosxautomation.com/automator/learn.html

One of the big frustrations for those of us in the design industry is that there are no Automator actions provided with Adobe Illustrator. However, that’s where our app Ai Actions comes in. It provides many actions for Illustrator allowing you to make Automator workflows to automate common artwork tasks.

Check out Ai Actions at the Apple App Store:

Illustrator Actions for Automator, Automator Actions, Automator Illustrator Actions

04 Apr

Automating barcodes on macOS using a service

Many years ago now, I was the office barcode expert – in as much as I was the only person with a copy of any barcode creation software. Colleagues would email me frequently with lists of barcodes they wanted me to create for them. Sometimes the numbers would be in a Word file, sometimes an email, sometimes a text file – you name it.

If only there was a way I could just highlight the text and make barcodes. Well, in those days, there wasn’t but luckily now we have Barcode Basics. In this tutorial I’m going to show you how use Barcode Basics to create a Service in Automator to create barcodes from selected text.

NB. You can click any of the screen shots to enlarge.

1. Launch Automator
Make sure you’ve launched Barcode Basics at least once – that’s what installs the action we’re about to use. Next, launch Automator. You’ll find it in your Applications folder.

2. Create a new service
Click the “Service” option to make a new service.

Services appear under the File menu of many apps in macOS, including Finder and allow you to add functionality from other applications.

In our example, we’ll be adding functionality from Barcode Basics to any app capable of understanding text. So, make sure you set the settings up as follows.

2. Configure your barcode settings
Drag the “Make Barcode” action from the Actions library (the list on the left hand side of your Automator window) into your workflow and configure as necessary.

3. Make a new email
Next, drag a “New Mail Message” action (from “Mail” in your actions library) into your workflow. You can configure as much or as little in the “New Mail Message” action as you like. I’ve configured the subject and body.

4. Save the service
Next, press cmd-S to save your service and give it an appropriate name

5. Give it a test!
If you open any kind of text file (e.g. a Word file, a TextEdit file) you should now be able to see your action under its File>Services menu. Simply select the barcode numbers (which must be one per line), then run your action by selecting it in the Services menu. You should get an email with the generated barcodes as attachments.

I hope this demonstrated just how easy it is to create a service to generate barcodes and add them to an email. Automation with Barcode Basics and Apple’s Automator software really couldn’t be easier. And, of course, you can use Barcode Basics as a stand alone barcode generator too if you prefer.

I sure wish I had this back in my days as office barcode expert! If you haven’t given Barcode Basics a try yet, check it out at the Mac App Store.


Link to Mac App Store to purchase Barcode Basics - Mac barcode software

03 Apr

Creating a simple Automator workflow to make barcodes

In this tutorial, we’re going to create a very simple Automator workflow to create barcodes from user input. In future tutorials we’ll look at more advanced methods, but for now, lets keep things simple. You’re going to need a relatively recent version of macOS and an installed copy of Barcode Basics (that you’ve launched at least once!) if you want to follow along with this.

NB. You can click on any of these screen shots to enlarge them.

1. Launch Automator
Automator comes free with macOS and can be found in your Mac’s Applications folder. Launch Automator and create a new workflow.

2. Get some user input
Drag an “Ask for Text” action into your workflow. If you have trouble finding it, type “ask” into the search field to narrow down the options. Note that’s what I’ve done in the pic below.

3. Drag in a “Make Barcode” action
Drag in a “Make Barcode” user action. Again, if you have trouble finding it, type “Make Barcode” into the search field. If you can’t find it, it may be because you haven’t launched Barcode Basics – the actions get installed when it’s first run (if this is the case, quit Automator, launch Barcode Basics then start again). Your workflow should now look something like this.

You can configure the barcode settings as required. Note that the settings (e.g. BWR) apply to all barcodes made with this workflow.

4. Move the resulting files
Initially your files will be created in your Documents folder, in a sub folder called “Barcode Basics”. You should move them out of there to their required location to avoid that folder slowly growing in size. The “Move Finder Items” action is a good choice for this.

5. Run the workflow!
Press the “Run” button in your Automator workflow to generate barcodes! Enter a new one on each line to generate multiple barcodes.

This is an extremely basic example of creating an Automator workflow using Barcode Basic’s Automator action. In coming tutorials, we’ll look at creating a an Automator app, service and some more complicated workflows.

Naturally, you can still use Barcode Basics as a stand alone app. However, I hope this demonstrates how easy it is to automate barcode production. If I’ve sparked your interest then head over to the Mac App Store to pick up your copy!


Link to Mac App Store to purchase Barcode Basics - Mac barcode software

31 Mar

Automate barcode production on macOS

We’re excited to announce the launch of a new version of Barcode Basics which includes support for Apple’s Automator app. This means that you can create barcodes in your own Automator workflows, services and even simple apps – without knowing anything about programming.

Imagine creating batches of barcodes from numbers supplied in a spread sheet. Or creating a barcode directly from text selected in an email. Anything you can do in Barcode Basics, you can now do in an Automator workflow.

Barcode Basics’ Automator workflow is included in every version of Barcode Basics, as standard. There are no hidden extra charges. And at just $15.99, Barcode Basics is the cheapest way of automating barcode production by a long shot. Compare that to some of it’s competitors!

For more information about Barcode Basics, or to pick up your copy head over to the Mac App Store by clicking the link below.


Link to Mac App Store to purchase Barcode Basics - Mac barcode software

17 Mar

Using Automator to convert Pages to PDF

Recently we were asked how to use Automator to convert Apple Pages documents into PDFs. In the spirit of sharing the knowledge, here’s how we did it.

It’d be great to make an app which we could drop our Pages files on and have them made into PDFs. The obvious way to make such an app is with Automator. Unfortunately, there aren’t any Automator actions available with Pages – or at least there aren’t at the time of writing this.

Luckily, Pages is AppleScriptable so we can make our own action. Let’s look at how to do that.

First, launch Automator (you’ll find it in your Mac’s Applications folder). Select “Application”.

Screen Shot 2016-05-12 at 13.19.38

Next, drag a “Run AppleScript” workflow into your workflow so you have something that looks like this:

Screen Shot 2016-05-12 at 13.20.06

Replace all the purple text in the action with the following AppleScript:

on run {input, parameters}

repeat with theFile in input
tell application "Finder"
set theFilesFolder to (folder of theFile) as text
end tell

tell application "Pages"
set theDoc to open theFile

set theDocName to name of theDoc
set theName to (characters 1 thru -7 of theDocName) as text
export theDoc as PDF to file ((theFilesFolder & theName & ".pdf") as text)

close theDoc

end tell
end repeat
return input
end run

Save the workflow and you should now have an app that you can drop Pages documents on.

Note that it’s up to you to make sure that the documents you drop actually are Pages documents – the script doesn’t check and may error if you drop the wrong type of documents.

Update for macOS Sierra

There appears to be a permissions related bug for Pages in macOS Sierra… or perhaps it’s an “undocumented feature” 😉 Either way, the above code will give you an error in Pages for Sierra. Try the following alternative:

on run {input, parameters}

repeat with theFile in input
tell application "Finder"
set theFilesFolder to (folder of theFile) as text
end tell

tell application "Pages"
set theDoc to open theFile

set theDocName to name of theDoc
set theName to (characters 1 thru -7 of theDocName) as text
set thePDFPath to ((theFile as text) & theName & ".pdf") as text
export theDoc to thePDFPath as PDF
close theDoc

end tell

tell application "Finder"
move file thePDFPath to folder theFilesFolder with replacing
end tell

end repeat

end run Read More

16 Mar

macOS Sierra: Export PDFs from Pages using AppleScript

It appears that macOS Sierra introduces a bug in Pages which means that you get a sandbox/permissions related error when trying to export a PDF using AppleScript.

Hopefully, Apple will fix it soon. However, until then, here’s a workaround (see sample below in a handler suitable for Automator).

The idea is to take advantage of the fact that the Pages file is a package (in effect, a folder) and temporarily save the PDF there, having done that, we move it to its correct location using the Finder. Scruffy, but it works.

on run {input, parameters}

repeat with theFile in input
tell application "Finder"
set theFilesFolder to (folder of theFile) as text
end tell

tell application "Pages"
set theDoc to open theFile

set theDocName to name of theDoc
set theName to (characters 1 thru -7 of theDocName) as text
set thePDFPath to ((theFile as text) & theName & ".pdf") as text
export theDoc to thePDFPath as PDF
close theDoc

end tell

tell application "Finder"
move file thePDFPath to folder theFilesFolder with replacing
end tell

end repeat

end run


On a (slightly) related note, if you’re interested in Automator actions for Adobe Illustrator, why not take a look at Ghostotter’s Ai Actions? Click the Mac App Store graphic below to find out more.

Illustrator Actions for Automator, Automator Actions, Automator Illustrator Actions
Read More

28 Feb

Backing up a folder on macOS with rsync

Terminal

Quite often we’re asked how to keep a backup folder in sync with a work in progress folder. There are many possible solutions apps and third party solutions out there, but its quite easy to set up a rough, homespun backup solution. All you need is a little command line wizardry using something called rsync.

Syncing with rsync

First, lets imagine we have two folders on our desktop. One is called WIP, which contains all my work in progress. The other is called Backup which is where I’d like to keep a backup of all my WIP.

Open up a Terminal window (you’ll find Terminal in /Applications/Utilities) and type:

rsync -av --delete

Don’t hit return yet! Next, drag the WIP folder onto your Terminal to get the path to your folder. Add a slash to the end of it. You should have something like this:

rsync -av --delete /Users/YourUserName/Desktop/WIP/

Don’t hit return yet! Of course, the path will be different on your Mac – don’t worry about it. Next, drag the Backup folder onto the Terminal. You should now have something like this:

rsync -av --delete /Users/YourUserName/Desktop/WIP/ /Users/YourUserName/Desktop/Backup

Now you can hit return! You should find that the contents of WIP are copied to Backup. If you run the command a second time, nothing will happen. This is the beauty of rsync. It’s smart enough to only copy files from WIP if an identical copy doesn’t already exist in Backup. Our “–delete” option means that anything in in Backup that’s NOT in WIP gets deleted.

Of course, your backup folder can be anywhere – on an external drive or even on a remote server.

Scheduling

There are a number of ways to make this rsync command run a schedule. You could run it via a scheduled Automator action, via cron using something like Cronnix, or (my favourite) using a Launch Agent.

Have fun with your new backup command!

16 Feb

Making shell scripts more user friendly

We were recently asked whether it was possible to copy all the files that contain some variable text from Folder A into Folder B as part of an Automator workflow on Mac OS X.

Our solution demonstrated a nice way of using Automator as a way to gather information from a user and pass it to a shell script. It’s handy because many users feel intimidated by the Terminal, but are happy to run an Automator action. Here’s what we did…

First, let’s assume that we have two folders on our desktop. One is called “Source” and the other called “Dest”. If we wanted to copy all files whose name contains “Xxx” from Source to Dest then we could fire up the Terminal and do:

find ~/Desktop/Source -type f -name "*Xxx*" -exec cp "{}" ~/Desktop/Dest \;

The “*Xxx*” bit is where we tell the find command that we’re interested in files whose name “Xxx” with any text before or after it. You might want to read up on other options the find command has if you’re not familiar with it – it can be really useful.

However, we don’t want “Xxx”, we want the user to be able to decide what text to search for. So, let’s set up an Automator workflow and add an action to get some that text from the user…

Ask for text

Hopefully that’s straight forward. Next, we add a “Run Shell Script” action:

Run shell script

If you feel like copying and pasting, then the code is:

for f in "$@"
do
find ~/Desktop/Source -type f -name "*$f*" -exec cp "{}" ~/Desktop/Dest \;
done

That’s probably a little less straight forward! So let’s look at it a bit more closely. First, note that “pass input” is set to “as arguments”. This means that the output of the previous action is passed to our shell script as a special variable called $@.

The variable $@ could theoretically be a list, so we use a for loop to go through each item. Odds are that it’ll only ever be one item, but at least this way it’ll still work if one day it is a list. Our for loop goes through the $@ list an item at a time and executes the code between “do” and “done” once for each item in that list (the item is in a variable called $f). The code being executed should be familiar as the find command from earlier, but with $f as the search string instead of “Xxx”

So, if you run the workflow now you should be prompted to enter some text. Your source folder should be scanned for files whose name contains the text you entered, and any matching files copied to the destination folder.

You can run the workflow as it is, or save it as an Application if you prefer. Hopefully users will find this a more user friendly way of passing parameters to a shell script and exceuting it than using the Terminal.

© 2014 ghostotter.com