The Smile Blog, With News, Tips, Photos and Other Stuff That Makes Us Smile

Tips on Shared Snippet Groups

Posted 07/17/2014 by Maia

Do you share a snippet group with a few other folks, a team, or an office?

If you don’t but would like to, you can set that up by hosting the group on your server, or even in a public Dropbox folder. You can find the exact steps here.

Here are a few tips on what makes a good shared group.

The Rules for Good Abbreviations Still Apply

Make abbreviations:

  • short
  • easy to remember
  • unique
  • unlikely to be typed by accident

But, you have the added difficulty of not knowing what abbreviations the team already has in their other groups, so making them extra unique is a plus. One way to avoid snippet conflicts is to use a naming strategy, for example, putting the same prefix onto each snippet in the group.






Alternate Abbreviations

If a team member doesn’t want to use the given abbreviation, there is the option of setting up a new snippet to expand the content of the old one but use its own unique abbreviation.

Create a nested snippet:

  1. Make a new snippet and set the abbreviation to whatever you like.
  2. For the snippet content, from the Insert menu (cursor button), located just above the Abbreviation menu, click on Snippet and then locate the old snippet.
    Alternately, if you know the snippet’s abbreviation you can just type the nested snippet syntax:

%snippet:{snippet name}%

Where {snippet name} is the abbreviation of the original referenced snippet.

You now have a snippet with a unique abbreviation, who’s content is pulled directly from another snippet.

Snippet 1

abbreviation: ,,email

Snippet 2

abbreviation: em1
content: %snippet:,,email%

Non-expanding Snippets

If the shared group’s snippets do interfere with personal snippets, try making alternate abbreviations for them as explained above and then prevent the original group from expanding with the original abbreviations.

Prevent a Group from Expanding:

  1. Click on the snippet group, the Group Settings will appear to the right.
  2. Set the “Expand in:” menu to “No applications (disabled).”

Good “Label” -ing

Each snippet consists of an abbreviation, the content it expands into, and a label, which is optional. If the abbreviation is not self-explanatory, and the content is too long to read at a glance, it will be hard to remember what the snippet does. Having a clear and brief label will help with that. The label is searchable, just like the abbreviation and content, so this is a good place for a search term that is not already in the snippet.

Use labels

More Snippet Explanation

If the label isn’t quite enough to explain the snippet, or all the parts of a multi-part snippet, you can use optional sections.

An optional section is a type of fill-in where you you have text in the snippet content, but you choose whether it expands with the snippet on a case by case basis.

In this specific case you would turn off “Include by default.”

When a user expands the snippet, they will see the extra text in the temporary expansion window, but it won’t expand with the rest of the snippet.

Use optional fields

Have any tips or tricks of your own? Let us know!

A Few Snippets More

Posted 07/07/2014 by Maia

We love us some snippets. Here are a few handy little snippet ideas to make your life just a little easier.

The following snippets work best when they can expand next to any character. Click on whichever group you place them in, and the Group Settings will appear to the right. Choose "Any Character" from the “Expand after:” popup menu.

Plain Text

Ever copy text and paste it into some sort of WYSIWYG editor, then post, or email, only to find out later all the font is different? The next time you paste some text, expand this snippet instead. It converts anything copied to the clipboard to plain text before it expands.

Abbreviation: ppt

Content: %clipboard

Label: Paste in plain text

Set the “Abbreviation:” menu to “Ignore case”

Set the “Content:” menu to “Plain Text”

The abbreviation can be whatever you want, that’s just a suggestion.

Capital "I"

While TextExpander settings can capitalize the start of a sentence (Preferences > Options), the lone letter “i” can appear anywhere in a sentence and it also needs capitalizing. This snippet uses spaces as part of the abbreviation so the flow of your typing doesn't need to change at all. The { } curly brackets are not meant to be in the snippet, they indicate instructions on what to type.

Abbreviation: {space}{lower case “i”}{space}

Content: {space}{upper case “I”}{space}

Label: Capitalize “I”

Set the “Abbreviation:” menu to “Ignore case”

Set the “Content:” menu to “Plain Text”

Space Between Sentences

For the writers, if you can’t re-train yourself to use Period-Space between sentences instead of Period-Space-Space, here’s a snippet to convert it for you.

Abbreviation: {period}{space}{space}

Content: {period}{space}

Label: Period Space

Set the “Abbreviation:” menu to “Ignore case”

Set the “Content:” menu to “Plain Text”

Open URL in Chrome

Usually for Flash, but you may have other reasons to want to view your currently open Safari tab in the Chrome browser. Since this is an AppleScript snippet it does not require you to be in a text field when you type it.

Abbreviation: cchrome


property theURL : ""
tell application "Safari"
	set theURL to URL of current tab of window 1
end tell
if appIsRunning("Google Chrome") then
	tell application "Google Chrome"
		make new window
		set URL of active tab of window 0 to theURL
	end tell
	tell application "Google Chrome"
		do shell script "open -a \"Google Chrome\""
		set URL of active tab of window 0 to theURL
	end tell
end if

on appIsRunning(appName)
	tell application "System Events" to (name of processes) contains appName
end appIsRunning

Label: Open URL in Chrome

Set the “Abbreviation:” menu to “Ignore case”

Set the “Content:” menu to “AppleScript”


You can find a group with all of these snippets for download here.

If you have any handy snippets you want to share, let us know.

Using URL Schemes with PDFpen for iPad and PDFpen for iPhone

Posted 06/12/2014 by Maia

The desire for Automation in the iOS-sphere by hungry power users is strong. To feed your hunger, several months ago we added support for custom URL schemes to PDFpen for iPad and PDFpen for iPhone

If you are not familiar, a URL scheme allows an action in an app on your iPhone from within another app. It's what allows you to tap on a street address on a website, or in an email, and have the Maps app open and show you that address. If you are interested in learning more, there's a nice intro article over at MacStories on automating Drafts.

What does this mean in terms of PDFpen on iOS? As part of some URL action, you can open a specific document you have in PDFpen, or even open to a specific page. This means you can open documents in Dropbox too, since PDFpen allows you to sync specific Dropbox folders.

Here are the details you need to use PDFpen's custom URL scheme.

Open the PDFpen app.


Open a document, named "Panther", stored locally in the main Documents view.

  • Three slashes /// are used for locally stored files.
  • The file name is case sensitive.
  • A file extension is needed along with the file name. This will usually be ".pdf".
  • When used with an invalid file name this will just open the app.

Open a document, named "Panther," to a specific page, page 3.

  • Append "?pg=" and the page number.

Open a document, named "Leopard", stored locally in a folder named "Big Cats."


Open a document, named "Grey Wolf," in a Dropbox synced folder named "Wolves."

  • Use two slashes // with files not stored locally.

For sub-folders, extend the file path to include them.


We hope the PDFpen URL scheme helps bring a new level of power to your iOS automation efforts. If you have a clever workflow you'd like to share, please write us and let us know.

SmileWorthy: BBEdit

Posted 05/29/2014 by Greg

BBEdit, from Rhode Island-based Bare Bones, is a Smile favorite. Here's why.

Éric says: “I love BBEdit because it’s an editor that's powerful enough to do serious work and quickly zip through multi-MB files, yet simple and friendly enough to serve as a TextEdit replacement when I just need to jot down a few quick notes.”

Maia adds: “I use BBEdit to update live web pages, and I love how I can open, edit, and save files right on the server. I've also been saved by the predictive auto-fill. While I use TextExpander for my most frequently used HTML tags, BBEdit is great for ones I use less often, ones I can’t always remember, or ones which have several variations to choose from.”

Mike continues: “I love BBEdit because it helps me see what I am doing. I can quickly twist down tags to ensure that I am viewing the HTML code that I want to edit. This simple feature has saved me hours of time trying to hunt down a missing tag that resulted in a malformed HTML page.

I have also started to care more about HTML code. I indent and comment now more than I ever have before. I remove extraneous code because I know it is extraneous and it now bothers me to leave it in. When I used WYSIWYG editors, I made changes until the HTML page worked. With BBEdit, I make changes until the HTML page is right.

…and the auto-save document feature has saved me numerous times.”

Philip notes: “I love BBEdit for it’s highly expressive find-replace. Nothing else like it.”

Greg concludes: “I love BBEdit because it's an awesome all-purpose text editor. Any time I wish I could do something with a text file, I fire up BBEdit and either do it immediately or learn how I can get BBEdit to do it quickly and easily.”

If you do any work with text files, definitely check out BBEdit. It'll make you smile.

Using TextExpander Date and Time Math

Posted 05/15/2014 by Maia

Let's say it's your job to remind people to do something. Maybe you are the accounts receivable person, and you regularly need to remind people to pay you in 15 days. If you use TextExpander, your days of looking at the calendar and calculating that date are over! You can create a snippet that automatically inserts a date that is 15 days from today. Here's how:

  1. Create a new snippet by clicking on the plus (+) button in the upper left of the TextExpander window.
  2. Open the Insert menu by clicking on the cursor button located just above the snippet’s Abbreviation pane. Choose Date / Time Math > Add Day(s).
  3. TextExpander inserts %@+1D, the day math macro, into your snippet content pane. Change "1D" to "15D".
  4. Insert the date format you wish to appear, again using the Insert menu. For example, if you want the date to appear formatted as “June 06, 2015”, insert the following:
    • Choose Date > Month: January. Add a space.
    • Choose Date > Day: 01. Add a comma and space.
    • Choose Date > Year: 2001.
  5. When you are done, the snippet content should be:  %@+15D%B %e, %Y
  6. Give your snippet an abbreviation, such as "d15" or "payupnow".

Note that any date math macro, in this case “%@+15D”, must precede the date formatting macros, in this case “%B %e, %Y”.

Never forget a Mail attachment using TextExpander

Posted 05/04/2014 by Brian

Do you sometimes forget to include an attachment in an email? We had a customer seeking a foolproof solution to guarantee that he wouldn’t type “attached” without also attaching a file. He was seeking a solution using another software package, but it inspired us to create the following slightly simpler solution using just TextExpander and Mail.

Create a Mail-only Snippet Group

Create a new snippet group and name it “Mail only”. To set a group to only expand in Mail, set the “Expand in:” menu to “Only These Applications…”, then select Mail from the list which follows.

Setup an Applet

Launch the AppleScript Editor which is found in your Utilities folder and create the following script:

tell application "System Events"
    delay 0.4 -- wait a bit for snippet 'replacement' to appear
    keystroke "a" using {command down, shift down} -- key equivalent for Attach Files
end tell


  1. Choose File -> Save…
  2. Set the filename to: AttachFilesKeystroke
  3. Save to your Applications folder:

Create a Snippet

In TextExpander, create a new snippet in your “Mail only” group, and set its “Content:” type to “AppleScript”.

Insert the following text for the replacement:

do shell script "open -g /Applications/"
return "attached"

Finally, set the abbreviation to “attached”, and for bonus points, set the Abbreviation type to “Adapt to Case of Abbreviation” so that the snippet will work for both “Attached” and “attached.”

Now, whenever you type “attached” in Mail, you’ll hear TextExpander’s expansion sound followed by the appearance of the Attachment selection dialog. If you have already attached the file, just press the Escape key to dismiss the dialog and continue typing.

If this is too intrusive for you, you can always change the abbreviation to something like “atttach”, but then you run the risk of forgetting an attachment.

Geek Notes

The open -g shell command opens the specified item without activating the application. This allows the focus to stay in Mail.

The snippet returns the abbreviation, so this snippet doesn’t really “expand”, but the key to getting this working is having the applet start up in the background and begin taking actions after a short delay. This strategy can be adapted to begin other actions based on a snippet expansion, including telling other applications to perform actions.

Use Automator workflows with PDFpen

Posted 04/17/2014 by Greg

[Now that PDFpen 6.2.1 includes an Open Scripts Folder menu item, we've simplified the instructions below. We improved PDFpen in repsonse to writing this blog post, and we hope you like the change. Please update to 6.2.1 before proceeding.]

PDFpen 6.2 adds support for running Automator workflows from the script menu.

If you're not familiar with Automator, I'd recommend this blog post from David Sparks. It's a great example and can help you decide whether or not you'd like to learn more. Automator workflows are quite visual and more accessible to folks without a programming background than AppleScript. This post isn't meant to be a tutorial on Automator workflows. It's meant to give you an example of what you can do with one of PDFpen's newest features.

Automator already includes a number of actions which can be applied to PDFs and an even greater number of actions which can be applied to files, and your PDFs are also files. Let's dive in and create an action to apply a grid to a PDF and open it as a new document.

  1. Launch Automator, found in your Applications folder
  2. Choose File -> New
  3. Click Workflow and press Choose. Your PDF will serve as the input to your Automator workflow
  4. In the Actions tab under Library select PDFs
  5. Drag Add Grid to PDF Documents to the blank area to the right labeled Drag actions…
  6. Under Library, select Files & Folders
  7. Drag Open Finder Items to the actions panel
  8. If PDFpen is not your default PDF viewer, choose it from the Open with: popup
  9. Choose File -> Save…, name your workflow Add Grid and save it to the Desktop

Now, we need to move the script to the appropriate location.

  1. Choose Open Scripts Folder from the scripts menu of PDFpen
  2. Move your script from the Desktop to the folder opened in step #1
  3. Quit and re-launch PDFpen
  4. Open a PDF to which you'd like to add a grid
  5. Choose Add Grid from the script menu
  6. Now, you have a new PDF with a grid

Hopefully, this gives you a flavor of the power of Automator workflows and inspires you to investigate how you might use them in concert with PDFpen to make your work easier.

If you have a great Automator workflow you'd like to share, please let us know.

Smileworthy: SuperDuper!

Posted 02/26/2014 by Greg

Given yesterday's release of OS X 10.9.2, this is a good time to tip our hat to SuperDuper! from Shirt Pocket.

SuperDuper! reliably creates bootable backups and offers thorough scripting and automation options.

Before I upgrade to a new version of OS X, I clone my startup disk using SuperDuper!

Yesterday, I cloned from one partition to another on an internal SSD, and it only took 36 minutes for 210 GB.

SuperDuper! is fast, reliable, and great at what it does.

If you need software to duplicate your startup disk for backup or for OS X upgrades, we strongly recommend SuperDuper!

SuperDuper! Icon

SuperDuper! is Smileworthy and is available for US $27.95.

PDFpenPro Wishes Mac Happy 30th Birthday

Posted 01/28/2014 by Greg

We are incredibly honored that PDFpenPro is included among the Amazing Apps celebrating Mac's 30th Birthday.

Happy Birthday, Mac, from Smile and PDFpenPro!

PDFpenPro in Happy Birthday, Mac Section on Mac App Store

SmileWorthy: CloudPull

Posted 01/27/2014 by Greg

We like to use Google Documents for online, real-time collaboration. We use it to take notes when we have meetings. We use it to edit product bullets. We use it to create spreadsheets when doing product planning. Generally, we're thrilled with Google Documents, but we use it for enough important stuff that we worry about our data.

Enter CloudPull from Golden Hill Software. CloudPull provides local, hourly backups of our Google Documents. I back up my local machine to both a Time Capsule and via CrashPlan, and with CloudPull all of our Google Documents are included in those backups as well. CloudPull is a great, straightforward solution to keeping local backups of Google Documents. It also includes support for backing up everything on your Google Drive, Gmail, and Google Contacts.

CloudPull is a wonderful piece of software, and it offers a great deal of peace of mind for its reasonable $24.99 price tag.

CloudPull is truly Smileworthy.