Transform Text into Functional Scripts: The Power of AI Prompts in Adobe Illustrator

Transform Text into Functional Scripts in Adobe Illustrator Cover Image

Can an ordinary designer working with Adobe Illustrator transform a text into a functional script? This intriguing idea led me, a designer and developer always on the hunt for tools to boost my creative process, to delve into Omata AI for Adobe Illustrator. The plugin is described as: “An experimental plugin that combines the power of ChatGPT with Adobe Illustrator. Explore how AI can support you in your creative and daily tasks”.

Omata AI caught my interest as a designer and script developer (look at my free scripts), especially with its direct integration into Adobe Illustrator. Can it outperform ChatGPT? What are its advantages and disadvantages? I’m eager to explore how it enhances workflows for designers and the skills needed to leverage its potential. Let’s uncover the answers on this journey and see how to transform a text into functional scripts. This review delves into my firsthand experience with Omata AI, evaluating its capabilities and determining its limits.

In this blog post, I cover the following:

  • Installation of the OmataAI plugin
  • Interface and Predefined Prompts
  • Identify a Task and Make a Prompt
  • Enjoy the Surprises!
  • Workaround with more complex tasks
  • Advantages and Improvement Possibilities
  • Conclusion

Installation

To start with, OMATA AI is not a free application.
A license key for OMATA AI can be acquired for $9.95 at http://shop.omata.io/. Please note that the pricing and availability of OMATA AI may be subject to change, so it’s always a good idea to visit the OMATA AI website for the most up-to-date information.

An API Key from OpenAI is available at https://platform.openai.com. While the API key is free, ChatGPT may incur additional costs. OpenAI often provides free credits for starters.
If you’re looking for information on obtaining an OpenAI API key quickly, a simple Google search for the ‘OpenAI API key’ can help you find the right resources and guides.
In addition, the OMATA AI plugin includes links to all the necessary resources and guides you through the setup process seamlessly.

Find the Secret API Key for your OpenAI conto

Interface and predefined prompts

Once I installed and configured the OMATA AI plug-in, I began to explore the plug-in further. In my experience, OmataAi has a user-friendly, simple and intuitive interface.

Creating a new chat is as simple as clicking on the plus, entering the chat’s name and going to the prompts. In the prompts section, you will find a wide variety of predefined prompts to choose from. These prompts are a great starting point and source of inspiration, especially for those just starting with AI language models. By choosing a prompt and experimenting with different options, you will quickly understand how the plug-in works and understand how you can apply it to your unique cases.

Create a chat to enter a text prompt.

Working With Predefined Prompts

I recommend trying some predefined prompts, as this way, you’ll better understand how the plugin works.

One of the OmataAI plugin presets prompts that will transform into a script.

It’s worth noting that prompts should not exceed 800 characters, so make sure your prompt stays within this limit. Once you’ve entered your prompt, click on the small plane icon, and the script creation process will begin.

 One of the OmataAI plugin presets prompts.

You can activate auto-run, and the script will be executed immediately after creation. If not, you can press the ‘Run’ button.
Wow! The script made a lot of black squares in the document. Cool, right? Let’s try something else.

Transform Text into Functional Script

One of the keys to success when creating a code with the chat model is to identify repetitive tasks and clearly understand the desired outcome. By recognizing these repetitive tasks, you can create prompts that are concise and presented in a step-by-step format.


For example, if you often need to copy selected items into another document, your prompt could be as simple as “Copy selection. Move it to a new document” or “Duplicate selected items. Move them to a new document.”
Another illustration could involve resizing or moving items identical to the selection: “Find all items that have the same height and width as the selected item. Resize them to 120 pt in width”

Gif shows how one of the scripts, created from a text works.


Examples of simple prompts

In the examples below, I tried to get some processes that I usually do when I finish my work with the document.

  • Remove all empty layers
  • Remove paths items without fill colour and stroke colour if they are not clipping masks.
  • Remove all empty text frames.
  • Rename the first three layers: “Art”, “Text”, “Info”.


how to adjust a prompt


On a personal note, as my previous script revolved around adding page numbers to artboards, I couldn’t resist the temptation to test this prompt as well: “Add artboard numbers to all artboards.”

Providing clear and detailed prompts is key to achieving the desired outcome. Starting with more straightforward prompts and gradually adding more complexity is a practical approach. It allows you to fine-tune the instructions and refine the results over time.

Take, for instance, my prompt, “Add artboard numbers to all artboards.” Although it initially worked, the placement of the numbers didn’t align as intended. I iterated on the prompt to address this by specifying the exact placement within the artboards. The revised prompt became:
“Add artboard numbers to all artboards. Horizontally, position the numbers 20 units from the left. Vertically, place the numbers 20 units higher than the bottom of the artboards”.

By providing these additional instructions, I achieved the desired outcome and ensured that the page numbers appeared precisely where I wanted them. This iterative process of refining prompts based on testing and observation is a valuable approach to working effectively with the chat model.

Look for inspiration

Check out @omata on X (Twitter) for inspiration and a collection of prompts. You can find a variety of prompts shared by others using Omata AI and even share your successful prompts with the community.

Enjoy the Surprises!

However, even with a well-crafted prompt, it’s important to note that the plugin may not always work seamlessly. The smoothness of its performance can vary depending on the complexity of the task at hand. In the words of the Omata AI team, “OMATA AI has ChatGPT under the hood. This is pretty new technology. Remember that it can occasionally deliver unexpected results or not produce any at all. Enjoy the surprises!” This acknowledgement from the developers highlights the need for experimentation and creating multiple prompts with different formulations to optimize the plugin’s output. And even so, the script can be unworkable.

If you’ve attempted various prompts and find that the desired script still doesn’t work as expected, you can correct the script manually. This feature allows users with scripting knowledge to adjust the generated code. However, for those unfamiliar with scripting, this option may not be accessible or feasible. In such cases, the lack of scripting expertise can pose a challenge and limit the ability to fine-tune the script further.

Workaround with Complex Tasks

When faced with more complex tasks, I discovered a workaround to achieve better results with OmataAI. Occasionally, OmataAI might not provide the desired solution, so I turned to chatGPT for assistance. By asking chatGPT to generate a step-by-step description of the process, I was able to overcome the limitations and accomplish my goals more effectively. Let’s look at the examples below.

Save the document as PDF


When faced with saving my documents as PDFs and exporting them to other formats like PNG, the simple prompt in OmataAI didn’t provide any result. To find a solution, I turned to chatGPT for assistance. I asked chatGPT to generate a step-by-step code for Adobe Illustrator that would save the file as a PDF in the exact location with the same name and then save it as an AI file. Using the prompt provided by chatGPT, I implemented it within the OmataAI plugin to accomplish the desired result.

  • Get the active document in Adobe Illustrator.
  • Get the path of the active document.
  • Save the active document as a PDF with the same name as the AI file name and in the same directory using the path obtained in Step 2.
  • Save the document as an AI file, and keep the same name.

Export all artboards as PNG/JPG

  • Sometimes, the script can be too long for OmataAI, so splitting tasks is a good idea. I tried to save PDF and export PNG simultaneously, but it didn’t work. Splitting the script into two parts proved helpful. Here’s a prompt for exporting PNG files:
  • Get the active document in Adobe Illustrator.
  • Get the path of the active document.
  • Check if the “PNG-Folder” directory exists in the path.
  • If the “PNG-Folder” directory doesn’t exist, create it.
  • Iterate through each artboard in the active document.
  • Create a new PNG file object with a name based on the artboard index.
  • Set the export options for the PNG file.
  • Enable artboard clipping to export only the content within the artboard boundaries.
  • Enable anti-aliasing for smoother edges.
  • Set transparency to false.
  • Set the horizontal and vertical scales to 100%.
  • Specify the artboard range to export only the current artboard.
  • Export the current artboard as a PNG file using the defined export options.

Outline text

I often find the need to outline text before sending a file to a maker, so I decided to explore scripting for this task. However, the simple prompt didn’t work as expected. OmataAI and chatGPT made the same mistake in the code. Generated script stopped after outlining the first text frame. This situation highlights the importance of having coding skills. The code generated after a more precise prompt addresses the issue. It collects all text items into an array and then iterates through it, outlining each text item individually. This approach ensures that the script doesn’t interfere with the length of the document’s text frames while outlining them on the fly.

  • Get the active document in Adobe Illustrator.
  • Create an empty array to store the text frames.
  • Loop through all the page items in the document.
  • Check if each page item is a text frame.
  • If a page item is a text frame, push it into the array.
  • Iterate through the array of text frames.
  • Outline each text frame in the array.


Advantages and Improvement Possibilities

Remove unuseful prompts

Deleting prompts would be highly beneficial for the chat interface, especially for newcomers who may create numerous prompts that turn out to be non-functional. The chat interface can quickly become cluttered and difficult to manage without the option to delete prompts.

On the flip side, a helpful tip is to gather all the functional prompts you create and organize them into a workflow. For instance, you can collect all the scripts you run when you finish working on your art. This approach allows you to streamline your process and have a cohesive set of functional prompts, contributing to a smooth workflow.

Transform Text into Functional Scripts in Adobe Illustrator. Organize prompts into a workflow.

Working with code

When working with code in the chat plugin, you can make adjustments and modifications directly within the interface. Although the working process may not be as optimal or convenient as using a dedicated code program, having this capability is still valuable. It allows you to make minor adjustments, identify potential mistakes, and become more familiar with scripting. While it may have some limitations, the ability to work with code within the chat plugin can be a helpful tool for experimenting and refining your scripts.

Conclusion

In conclusion, my experience experimenting with the OmataAI plugin in Adobe Illustrator leads me to several observations. Firstly, having a plugin that can generate scripts from simple text prompts directly within the application is beneficial. It has the potential to raise awareness among designers about the advantages of automation workflows and pique their interest in scripts.

Additionally, working with OmataAI can foster the development of the skill of creating helpful prompts, which will undoubtedly be valuable shortly.
However, I am concerned that some individuals may see it as a playful tool without benefiting those who lack the time or patience to utilize it fully.

For those already experienced in script writing, chatGPT remains a more convenient and flexible tool, even in the free version.



Share:

Author picture

My name is Katja Bjerrum and I love to eliminate boring routine tasks in Adobe Illustrator. I work with scripts, actions and other tricks in Adobe Illustrator to streamline work processes.

Table of Contents

Recent Posts

Leave a Reply

Your email address will not be published. Required fields are marked *