How to Use AI to Analyze Scripts
This article is written for FileMaker developers (or any programmers) about how to use ChatGPT and Lucidchart to analyze a programming script and create a flowchart to diagram the script.
Sometimes we are tasked with discovering what a previous developer did. Often, amateur developers do an inadequate job of commenting and describing their scripts. So, it can be a time-consuming process to decipher an unlabeled script. But ChatGPT and Lucid Chart working together can speed up the process of analyzing any scripts.
You may wonder what is the Lucid application in ChatGPT, and I did too. So I asked it a question about itself: What is Lucid in ChatGPT?
This is the answer it gave:
The Lucid application within ChatGPT is a plugin that enables users to generate diagrams directly from text prompts. By describing the diagram you need, Lucid interprets your input and creates an editable version in Lucidchart, a cloud-based diagramming tool.
Key Features:
- Text-to-Diagram Conversion: Input a description of the desired diagram, and Lucid generates it automatically.
- Editable Diagrams: The generated diagrams can be opened and modified in Lucidchart to suit your specific needs.
Supported Diagram Types:
- Flowcharts
- Process diagrams
HPDS employee, Charlie Maitland, wrote these steps for creating and modifying an editable Flowchart created with the ChatGPT and Lucidchart AI modeler.
Steps to follow:
1. Open your FileMaker solution and print the key functional scripts to a PDF file. (It isn’t possible to select all the commands in a script, copy them, and paste them somewhere else. For some reason, Claris, doesn’t allow this simple, intuitive step. Instead, the script must be exported as a PDF, using the Print command under the File menu, and then copied.)
2. Go to ChatGPT and use the Lucidchart AI model, https://chatgpt.com/g/g-bHwQjRxeg-lucid , sign in
3. Copy the text from any script previously printed to PDF
4. Paste that content into the ChatGPT prompt line
5. The resulting ChatGPT summary will be shown and an edit link will be provided to the LucidChart application.
6. Tweak the process by continuing the conversation with ChatGPT to refine the process
7. Click on the edit link to open LucidChart and login with a free-tier or premium account
8. Begin making changes to the first draft of your diagram.
9. Save the diagram to a folder or repository as a versioned document so that it can be shared with your team. When completed, it can be exported as a PDF or image file.
10. Build a knowledge base of your business processes – keep them up-to-date
To test this process, I copied this script from the program FREELANCE created by HPDS.
DASHBOARD: ( 248 ) FIND Top Clients
ChatGPT analyzed the script and said:
This FileMaker script finds and displays the top 10 clients based on their total payments. Here’s a breakdown of the process.
Start: Triggered on dashboard open or refresh button click.
Setup:
Freeze the window.
Allow user abort and set error capture.
Main Action:
Enter Find Mode.
Go to the client layout.
Find all records with payment values.
If an error occurs, return to the dashboard and exit.
Sort records by payment amount in descending order.
Loop through the first 10 records:
Record client details into a variable.
Exit the loop after 10 clients.
Closure:
Return to the dashboard.
Refresh the window and show a confirmation dialog if initiated by a button.
Let me create a flowchart to visualize this process.
Then an editable flowchart was created with LucidChart.
This looks like an accurate flowchart of the script.
Of course, the real benefit of this AI process is to get a flowchart created of a complicated process that is hard to visualize. This tool could be used to analyze a script that’s been written by someone else. This is a common process for developers who take over a project created by a different person.
Or, you could share this analysis and flowchart with others on your team to work on a project together. The ChatGPT and LUCID modeler provide links to invite others to the project and also also for exporting the flowchart as a graphic to be shared.
Do you have a script or program you’d like analyzed?
Contact HighPower Data Solutions at HighPowerData.com.