Use ChatGPT to Generate TextExpander Checklists

Have you ever wanted to create a Snippet with a long list of checkboxes, but didn’t want to go through the tedious steps of adding multiple Optional Sections? There is a much easier way, but give me a second, it’ll take a bit of explaining.

I wanted to create a Snippet for a prompt to help ChatGPT create a custom workout plan based on the fitness equipment you have, with the idea being that you simply check the boxes for what you have. This list could have potentially hundreds of items, so it’d be pretty tedious to make by hand.

Older versions of TextExpander let you directly edit the “source” of a Snippet, so you could add special codes for things like Optional Sections, like so:

%fillpart%** <content of optional section>**%fillpartend%

You can still use these codes to create a Snippet if you’re in JavaScript mode:

  1. Set the Content Type to JavaScript.
  2. Paste in the code.

  1. Change the content type to Plain Text or Rich Text. The code converts to the optional section bubbles.

There are a number of ways you could programmatically wrap items in a list with %fillpart% and %fillpartend% tags, but ChatGPT makes this super easy. Either give it your list or use it to generate a list and then tell it:

For each item, it should be wrapped in two tags like this: %fillpart%%fillpartend%

You can then copy that from ChatGPT and then paste it into a new Snippet—be sure to set the Content Type to JavaScript!

2 Likes

I just figured out how to get a TextExpander JavaScript snippet to wrap the items in the list with the fillpart syntax. It wasn’t obvious because of the way TE handles % tokens.

Can this idea be used for the popup menu items, like all the days of the week or a list of dates like 1 to 31, or other common lists, instead of inputin each one at a time?

Yes, you should be able to. The syntax is:

**%fillpopup:[default=]\<value\>:\<value\>:\<value\>[…]%**

Maybe I should create and share some Snippets with these that people could load into their own libraries?

1 Like

Thanks for this, though I wish you’d have posted it a week earlier! I just made a couple snippets like this. I am sometimes too succinct in my emails to clients, so I used ChatGPT to help me come up with a variety of friendly additions and created a snippet “;friendly” that gives me a choice of sentences to choose from.

1 Like

I wish I had come up with it six months ago! But what’s cool about this community is it’s making me think about stuff like this, and now we have a central place to post and discuss these ideas.

2 Likes

Hey Larry, I hope this is helpful.

Would be a lot easier all round if we could still use the percent-syntax and it just got parsed by Textexpander. Never really understood why you got rid of it.