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!

4 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?

2 Likes

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.

2 Likes

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.

4 Likes

Hey Larry, I hope this is helpful.

1 Like

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.

I feel like I can’t get chat gpt to help me with formatting snippets. I am in mental health and my electronic healthcare system will only properly format plain text format. I have windows and despite all of the prompts to get it right, only a handful of occasions does it actually show up correctly. When I was able to get it to work, I had to set it to java script, paste the contents, try out the snippet, go back and change it to plain text. Either I tediously build it, keep repeating myself and yelling at chat gpt for not getting it right, or make a partially finished snippet that I abandon only until I get a glimmer of ambition to try again. sigh

Hi Victoria, can you share more detail about what you’re trying to accomplish? Feel free to send me a DM if it’s more comfortable.

I’m getting used to this community forum and I’m not sure how to send you a direct msg but I have the $20/month paid chat gpt and in python it keeps putting out %fillpopup:name like it was mentioned earlier in this thread. I wish I knew what prompts to do it because I have a lot of medical templates to use but I don’t have the time and bandwidth to program them all into my TextExpander library and I was wondering if there was something that I am missing.

1 Like

Hi Victoria, it can be tricky to get an LLM to create snippets with the correct formatting syntax, but it’s certainly possible in a lot of cases. You mentioned you have a lot of existing templates, are those stored somwhere we might be able to take a peek at them? In a document or export file perhaps? It would probably be easiest if you start a support ticket with us at support@textexpander.com and then we can see if we can help out.

J.D.