14 Mar

Still the best AppleScript IDE

Script Debugger - AppleScript

Many moons ago, I was a humble (well, humble-ish) Graphic Designer at a small print shop. My life was made a misery by all the routine, time-consuming non-graphic design stuff I had to do in the course of the day. Stepping up business cards for output, exporting a stack of Illustrator files as PDFs, zipping and uploading files to FTP sites… it was a pain.

Sure, I’d heard of AppleScript and tried my hand at it but I just couldn’t make head nor tail of the scripting dictionaries. And when stuff wasn’t working I had no idea why not.

That all changed when I got my hands on a copy of Script Debugger from Late Night Software. I’ve been recommending it to would-be AppleScripters ever since. It gave a nice view of applications’ dictionaries and they suddenly made sense. It made debugging so much easier and I was actually able to figure out why my scripts weren’t working… most of the time anyway.

Over ten years on and I still use it on the (admittedly rare) occasions when I dip my toes into AppleScript, and I’d be lost without it. Script Debugger is still going strong and it looks like the latest release brings some cool new features and a stripped down free version.

If you have an interest in scripting/automation on macOS, do yourself a favour and get a copy of Script Debugger.

Of course, if you don’t want to get your hands dirty with scripting, you can talk to us about custom scripting. No job too small! Click here for more info.

NB. We’re not affiliated with Late Night Software in any way – we’re just big fans of their product.

30 Jan

Are you an Adobe Illustrator drudge?

Automator actions for Adobe Illustrator

If you’re a regular user of Adobe Illustrator then you probably find yourself doing more than your fair share of drudge work. Here’s a way of avoiding some of it…

Drudge work comes in many forms, for example gathering all those linked images together ready to send your files for printing. Or opening a large number of files, saving each one as a PDF and uploading them to an FTP site. The sort of stuff you never really signed up for when you decided to become a graphic designer or artworker.

Of course, you could teach yourself AppleScript and write your own scripts to automate your workflow. But who’s got time to learn AppleScript? Or you could hire an AppleScript expert. Or you could invest in technologies like Automation Engine from ESKO, but the price tag puts those options beyond the budget of many freelancers and many small businesses.

This is where our product Ai Actions comes in. It adds support for Adobe Illustrator to Apple’s workflow software, Automator. If you can drag and drop then you can create your own automatic workflows to automate Illustrator and integrate with other apps too such as Mail, Preview etc. You can even save your workflows as apps.

A sample action fro Ai Actions
Click here to see how to use Ai Actions to create a simple workflow in Automator.

If you want to try your hand at automating Adobe Illustrator then why not download the demo version of Ai Actions from here:

Ai Actions DEMO

…the demo version contains a small selection of the actions available in the full version which contains over 20 useful actions and is available from the Mac App Store.

Mac_App_Store_Badge_US_UK

29 Jan

Scan barcodes from your Mac’s screen

We’ve relaunched an old favourite app, Onscreen Barcode Scanner this month with an update for macOS Sierra and High Sierra.

Onscreen Barcode Scanner allows you to scan barcodes displayed on your Mac’s screen and see the number they encode. Using it is as easy as taking a screen shot! It makes a ideal partner to our flagship barcode product Barcode Basics.

Onscreen Barcode Scanner’s main use is in packaging artwork so designers can check that the bars on the code actually match the displayed digits. It’s a great way of catching hard to spot barcode errors.

We’d had to take Onscreen Barcode Scanner offline to do some work on it to make it compatible and it took longer than we thought. Apologies for that. It’s now back up and running, and the update is free through the Mac App Store for existing users. Hope you find it useful!


Mac_App_Store_Badge_US_UK

05 Jan

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, Pages doesn’t ship with Automator actions (although there are some funky third party options)

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.

On a related note, if you’d rather dodge the AppleScripting all together then you could try out our handy Automator Actions:

07 Nov

We’re launching Priority Support Subscriptions!

All users get free support for Ghostotter products. However, we understand that our software is business-critical for some users and they need a faster support response than other users.

If that sounds like you then you might want to consider purchasing a priority support subscription (PSS). A PSS enhances the support options for your product with the following benefits:

A faster response
We always try to respond to support requests as quickly as possible. However, some users need a super-fast response. With a PSS, we will respond to your support request within 1 working day. (Normal response time is within 3 days).

A dedicated support contact
You will have a dedicated member of the Ghostotter development team who will be your first point of contact should you need help. NB. Contact will be via email and in English.

Priority support
Support requests from users with a PSS will be dealt with ahead of other support requests.

Priority development requests
Development requests (e.g. new feature requests) from users with a PSS will be prioritised ahead of other development requests. Be aware that not all development requests will be accepted.

More Info

20 Oct

The case of the elusive “℮”

Recently, I needed to choose a font on macOS which would support Russian and also the character “℮”. You can often find the ℮ character next to the weight/volume on packaging e.g. 150ml . It indicates that the value is estimated.

How did I figure that out? Luckily, I remembered one of our lesser known apps called Fonty, which was designed for exactly this kind of situation. Here’s what I did…

Firstly, launch Fonty and uncheck every language except Russian. Hey presto, we now have a list of fonts that contain all the glyphs required for the Russian language.

That’s great, but not all of these will have a glyph for the “℮” character. We need to filter out the fonts that don’t support it. This is where Fonty’s custom character sets come in. We select Preferences and click “Add” to add a new character set adding just the “℮”. Right there at the bottom, see?

Having closed the preferences window, I can now see my new character imaginatively called “℮”. If I select it *and* Russian, I can now see a list of all fonts installed on my Mac which support Russian and the ℮ character.

Of course, I could have just added the ℮ to my Russian character set. The beauty of doing it the way shown above is that you can select the ℮ in combination with other character sets. So for example, if you wanted to find out which fonts support Czech and ℮ then you’d just need to select Czech instead of Russian.

In conclusion, Fonty lets you choose the right font to use for the characters you need to support. You can get your copy from the Mac App Store!

Mac Font Repertoire checker validate validator

31 Jul

Custom screenshots app on macOS

Recently, a macOS user asked for a recommendation for an app which would take a screen shot and save it in a folder, with a name based on the current time in a particular format – they didn’t like the macOS default naming.

Rather than recommend an app, we showed them how to make their own using Automator. Here’s how to do it:

First, open up Terminal (found in /Applications/Utilities) and type:

pwd

…then return. It should give you a path that looks something like:

/Users/YourUserName/

If you add “Desktop” to the end of that then you have the path to your desktop. So, it should be something like:

/Users/YourUserName/Desktop/

Don’t forget the slash on the end.

Right! That was the hard bit. Next, replace the XXX in my line below with your desktop path:

theDate=$(date "+%Y-%m-%d_%H-%M-%S"); theSaveFolder="XXX"; screencapture -i -o "$theSaveFolder/$theDate.png"

Next, fire up Automator (in your Applications folder). Make a document of type “Application”. Then all you need to drag a “run shell script” action from the side bar into the main panel and replace the default text with the line above.

You should now have something that looks like this (click for a larger view):

Save your work, and you now have a shiny new app which will take screen shots and name them with a timestamp whenever you click it. Of course, you can play around with the time stamp format if you like. There’s a guide to the UNIX date command (which is what we’re using) here https://ss64.com/bash/date.html

For more cool ideas with Automator, why not check out:


24 Jul

Easy method of ad blocking on Mac OS X

no ads

Adverts are a common annoyance for most internet users. If you want to get rid of them then there are plenty of third party ad blockers around. However, if you want to get super-geeky then there’s a clever trick you can do using your Mac’s hosts file, and that’s what we’re going to look at today.

Apart from earning you many Geek Points, a hosts based approach has the advantage of not being bound to any one app (e.g. Safari) – it comes into play whenever any app accesses the internet.

About hosts files
Firstly, what is a hosts file? Put simply, a hosts file is a text file containing a look-up list of hostnames to IP addresses. For example, a web server’s IP address might be something unwieldy like “http://123.345.789.012”.

However, by editing your computers hosts file you can tell your computer that whenever you enter the address “http://myserver”, what you actually mean is “http://123.345.789.012”, and the computer will do the switcheroo for you automatically whenever you try to access that server.

So how does that help?
Adverts are usually hosted on servers other than the page you’re looking at. If we had an extensive list of known ad servers then we could use our hosts file to redirect links to those ad servers to something else. For example, that “something else” might be the ip address 127.0.0.0, which is almost certainly your Mac’s home address. Since we’re not running an ad hosting server from our Mac (hopefully!), those requests will fail and the ads would not load.

All we’re missing is a long list of known ad servers, right? Luckily, there is a list of them at someonewhocares.org which is regularly updated, and they also include many ‘dodgy’ sites including those with offensive content, known malware sources etc. So we have all the pieces of the jigsaw. Lets see how we can edit our hosts file to use this list.

  • Firstly, select Finder>Go To Folder, type “/etc/” in the box then click the “Go” button. (NB. without the quotes, but with the slashes!)
  • You should see a file called “hosts” in the folder you just opened. This is your hosts file. Make a backup copy of it and keep it somewhere safe, just in case.
  • Next, go to http://someonewhocares.org/hosts/ and copy the text from “# This hosts file brought to you…” down to the bottom (omitting the date that’s on the last line).
  • Open the hosts file in a text editor. I strongly recommend TextWrangler because word processors e.g. Word can add unseen mess into your file which can break things. If your Mac asks if you want to unlock the file, say “Yes”.
  • Paste your copied text into your hosts file and save it, making sure you save it as “hosts”, not “hosts.txt” or any other variant. NB. You may need your Mac’s admin password to save the file.
  • You’re done!

    If you experience any problems, or want to undo what we just did then just replace your edited hosts file with your backup copy. If you find a site that you want to visit is blocked, simply open the hosts file, find the line with the site in it and either delete that line or add a # before the line to disable it.

    If, after some time, you find you start seeing ads again then you may need to update the contents of your hosts file. Just go through the same procedure, but using the current list from someonewhocares.org – they update quite regularly.

    Happy (mostly) add free internet!

    06 Jun

    Build your own PDF exporting droplet for Pages

    In this tutorial, I’m going to show you how to use our Pages Automator Actions to create a PDF exporting droplet for Apple’s Pages word processing app. If you want to follow along, you’ll need a copy of Pages, Automator (in the apps folder of all fairly recent Macs) and a copy of Pages Automator Actions.

    If you’ve not used Pages Automator Actions before, you’ll need to open it from your Applications folder so it can add its actions to Automator. Once you’ve done that, you can close it and you’ll never need to open it again.

    Create a new app

    Open Automator (you’ll find it in your Applications folder), create a new document and select “Application” in the menu that appears.

    Add the actions

    Select “Pages” from the left hand section of the window and drag the actions in as shown in the screen shot below. Note that “All documents” is selected in all of them – don’t forget that!

    The first action will make our app open any of the documents dropped on it in Pages. The second will export all open documents as PDF files. The PDFs will be in the same location as the Pages files used to create them – with a .pdf file extension, of course!

    Save your app

    Save the app somewhere you’ll be able to find it, e.g. your desktop. Make sure the File Format is set to “Application”. Once you’ve saved your app, you will be able to drop one or more PDFs on it and they’ll be automatically turned into PDFs!

    Note: There was a bug in some earlier versions of Pages which might have given a permissions related error when doing this. If you have errors, make sure you’re running the latest version of Pages.

    And there’s more…

    Automator actions for Pages has actions for exporting PDFs, Word, RTF and more handy actions to help you create cool apps, workflows and services.

    Why not get your copy today and start automating Pages the easy way, for only $14.99*

    * or near local currency equivalent

    05 Jun

    New! Automator actions for Pages

    We’re pleased to announce a new tool to help you automate Apple’s Pages app using Automator workflows. Pages Automator Actions allows you to create workflows, apps, droplets and services to make those repetitive, time consuming tasks go like a breeze.

    Whether it’s batch exporting documents to ePubs or PDFs, or finding and replacing text in the body text of a collection of documents, the handy actions can save you time and effort.

    Of course, since Pages Automator Actions works with Automator, no knowledge of AppleScript or any other type of coding is necessary. If you can drag and drop then that’s all you need to know.

    Included actions are:

    • Open document(s)
    • Close document(s)
    • Export as ePub
    • Export as PDF (with optional password protection)
    • Export as formatted text (rtf)
    • Export as unformatted text (txt)
    • Export as MS Word (doc)
    • Find and replace text (body text of word processing documents only)
    • Make new document
    • Save document(s)

    Why not get your copy today and start automating Pages the easy way, for only $12.50*

    * or near local currency equivalent