# Experiment: Create Floating Menus With ChatGPT

**URL:** <https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746>\
**Category:** Tutorials\
**Created:** [May 22, 2025, 2:12pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746 "2025-05-22T14:12:10Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [May 22, 2025, 2:12pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/1 "2025-05-22T14:12:10Z")

</div>

So this is very experimental. I just gave ChatGPT some basic definitions on how to create floating menus and it seems to work pretty well:

[https://chatgpt.com/g/g-682f2d1fe228819189a378ff41eba002-bettertouchtool-floating-menus](https://chatgpt.com/g/g-682f2d1fe228819189a378ff41eba002-bettertouchtool-floating-menus)

Example query:

> Can you create a floating menu with 4 buttons in some pleasant looking blue, red, purple and green? The menu should be placed at the bottom right of the screen. It should be 200x200px in size

You can then just copy the JSON it outputs and paste it into BTT. (After pasting you might need to perform one app switch)

This probably needs more tweaking and I need to give it more example code, but even with this super basic approach it already works astonishingly well. I hope I can soon provide definitions for everything in BTT so the AI's can generate full action sequences etc. as well.

---

<div class="post-metadata">

**Author:** ![Alex4](https://community.folivora.ai/letter_avatar_proxy/v4/letter/a/b487fb/32.png) [@Alex4](https://community.folivora.ai/u/Alex4)\
**Post date:** [May 22, 2025, 3:22pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/3 "2025-05-22T15:22:10Z")

</div>

Maybe the link expired.

 ![image](https://community.folivora.ai/uploads/default/original/3X/e/0/e0cc07a827ddfdea8ac77298305febf3668fcfe2.jpeg)

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [May 22, 2025, 3:26pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/4 "2025-05-22T15:26:36Z")

</div>

Ah I think it was accidentally still set to private, should work now

---

<div class="post-metadata">

**Author:** ![xidiot](https://community.folivora.ai/user_avatar/community.folivora.ai/xidiot/32/27204_2.png) [@xidiot](https://community.folivora.ai/u/xidiot)\
**Post date:** [May 22, 2025, 9:22pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/5 "2025-05-22T21:22:28Z")

</div>

This should really promising and powerful:

> I hope I can soon provide definitions for everything in BTT so the AI's can generate full action sequences etc. as well.

It is really good idea!

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [May 22, 2025, 9:27pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/6 "2025-05-22T21:27:51Z")

</div>

yep, and then have some button in BTT "Configure Using AI" or something like that.

I'm currently finalizing some things from the current alpha/beta phase and release the next stable early next week. After that I have quite a few plans for AI related things for the upcoming weeks (mostly integrated local AI MCP server, AI definitions and integrated AI prompt window). I think this will be really powerful and make lots of things easier.

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [May 22, 2025, 9:35pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/7 "2025-05-22T21:35:31Z")

</div>

May I ask, as an ignorant person, what should prevent an AI from being something like BTT itself in the near future. Instead of setting up a floating menu, a shortcut, a key sequence in BTT, I set it up directly in the AI. I don't want that. Does anyone want this?

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [May 22, 2025, 9:41pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/8 "2025-05-22T21:41:11Z")

</div>

nothing will prevent that, everything is heading into that direction and it's going pretty fast. Pretending it's not happening won't help, so I'll at least try to work with it as long as possible 🙂

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [May 22, 2025, 9:46pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/9 "2025-05-22T21:46:08Z")

</div>

That's brave of you 😃 But why do we still need you and BTT? Are you digging your own grave right now? I'm sure nobody here wants that 😉

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [May 22, 2025, 9:49pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/10 "2025-05-22T21:49:39Z")

</div>

Yep, I think society will change drastically. Hundreds of thousands of jobs will be created by AI , but many millions of jobs will be lost to AI

I don’t think we are ready for that, but we also can’t stop it anymore

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [May 22, 2025, 9:56pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/11 "2025-05-22T21:56:37Z")

</div>

Will your job be recreated or destroyed? 🤷‍♂️

Humanity has just created its Syknet. For those who haven't seen the movie: This is the AI that almost wiped out humanity in Terminator. Perhaps we will then want to return from the future to destroy the machine. But time travel is one of those things ...

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [May 22, 2025, 9:57pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/12 "2025-05-22T21:57:45Z")

</div>

> [@Frank1](#):
>
> recreated or destroyed?

maybe both? 😉

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [May 22, 2025, 10:02pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/13 "2025-05-22T22:02:26Z")

</div>

You could be one of those who program the AI to be better than you are. Then the AI has to help you be better than it, so that you can make it better than you again ... You could go crazy. 😂

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [May 22, 2025, 10:07pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/14 "2025-05-22T22:07:01Z")

</div>

Or maybe I‘ll just get into wood working

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [May 22, 2025, 10:23pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/15 "2025-05-22T22:23:20Z")

</div>

Wood working??? And what should we do who are dependent on BTT? Ah, sure, we use Skynet.

Andreas, now that we're so close and no one is listening, I've rarely granted success to anyone the way I grant it to you. Long may BTT continue to exist. And may you continue to put up with my stupid questions and the even stupider ones from other users for a very long time. Oops, no offense to other users, of course. Except for those who deserve it. 😃

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [May 22, 2025, 10:33pm UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/16 "2025-05-22T22:33:56Z")

</div>

Thank you & good night 🙏

---

<div class="post-metadata">

**Author:** ![Max\_Megalon](https://community.folivora.ai/user_avatar/community.folivora.ai/max_megalon/32/23811_2.png) [@Max\_Megalon](https://community.folivora.ai/u/Max_Megalon)\
**Post date:** [May 23, 2025, 9:30am UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/17 "2025-05-23T09:30:37Z")

</div>

this is fun... 🙃

a small clock display...with Java script generated for the button display  
all from GPT...

only a few small tweaks in the script setting and we are done...

 ![Clock](https://community.folivora.ai/uploads/default/original/3X/9/5/959f39e0073c73ae2ba1ba53274d80e7332d1b1d.png)

 ![Script settings](https://community.folivora.ai/uploads/default/original/3X/7/b/7bb0e500821806b24a946b54d48975ed690e5586.jpeg)

---

<div class="post-metadata">

**Author:** ![fortred2](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/e79b87/32.png) [@fortred2](https://community.folivora.ai/u/fortred2)\
**Post date:** [May 25, 2025, 7:14am UTC](https://community.folivora.ai/t/experiment-create-floating-menus-with-chatgpt/43746/18 "2025-05-25T07:14:33Z")

</div>

Very cool project @Andreas_Hegenberg ! I've been quite busy so I haven't had the time to fully explore your custom GPT.

As you know from our conversations, I've been exploring the possibility of creating BTT configurations using LLMs for some time. Here's a script I wrote in October 2024, I think you'll appreciate it 😉

```js
// src/index.ts

import dotenv from "dotenv";
dotenv.config();

import OpenAI from "openai";
import { zodResponseFormat } from "openai/helpers/zod";
import { SimpleFormatSchema } from "./schemas";

const openai = new OpenAI({
	apiKey: process.env.OPENAI_API_KEY,
});

async function generateSimpleFormatItem(prompt: string) {
	const responseFormat = zodResponseFormat(
		SimpleFormatSchema,
		"simple_format"
	);

	try {
		const completion = await openai.beta.chat.completions.parse({
			model: "gpt-4o-2024-08-06",
			messages: [
				{
					role: "system",
					content: `You are Andreas Hegenberg, the creator of BetterTouchTool.
Your objective is to help users use the new "Simple JSON Format" feature.
BetterTouchTool introduces a new "Simple JSON Format", which can currently be used
with the predefined action "Show Custom Context Menu (New)".
It allows to retrieve the content for those menus dynamically using JavaScript & JSON.
Your objective is to fully understand the user's request for a new Custom Context Menu
and then produce the JSON to implement their request.`,
				},
				{ role: "user", content: prompt },
			],
			response_format: responseFormat,
		});
		console.log("Completion:", completion);

		const message = completion.choices[0].message;

		if (message.parsed) {
			const parsedData = message.parsed;
			console.log("Parsed Data:", parsedData);
			return parsedData;
		} else if (message.refusal) {
			console.log("Model refused to comply:", message.refusal);
		}
	} catch (error) {
		if (
			error instanceof Error &&
			error.constructor.name === "LengthFinishReasonError"
		) {
			console.log(
				"Response was cut off due to length. Consider increasing max tokens."
			);
		} else {
			console.error("An error occurred:", error);
		}
	}
}

generateSimpleFormatItem("Create a test Custom Context Menu.");

```

```json
{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"type": "object",
	"title": "SimpleFormatRoot",
	"properties": {
		"items": {
			"type": "array",
			"items": {
				"$ref": "#/$defs/SimpleFormatItemBase"
			}
		}
	},
	"additionalProperties": false,
	"required": ["items"],
	"$defs": {
		"Color": {
			"type": "object",
			"properties": {
				"red": {
					"type": "integer",
					"minimum": 0,
					"maximum": 255
				},
				"green": {
					"type": "integer",
					"minimum": 0,
					"maximum": 255
				},
				"blue": {
					"type": "integer",
					"minimum": 0,
					"maximum": 255
				},
				"alpha": {
					"type": "number",
					"minimum": 0,
					"maximum": 1
				}
			},
			"additionalProperties": false,
			"required": ["red", "green", "blue", "alpha"]
		},
		"SimpleFormatItemBase": {
			"type": "object",
			"properties": {
				"title": {
					"$ref": "#/$defs/AttributedText"
				},
				"type": {
					"$ref": "#/$defs/SimpleFormatItemType"
				},
				"submenu": {
					"type": ["array", "null"],
					"items": {
						"$ref": "#/$defs/SimpleFormatItemBase"
					}
				},
				"background": {
					"$ref": "#/$defs/Color"
				},
				"icon": {
					"$ref": "#/$defs/IconDefinition"
				},
				"action": {
					"$ref": "#/$defs/Action"
				},
				"setvariable": {
					"$ref": "#/$defs/SetVariableDefinition"
				}
			},
			"additionalProperties": false,
			"required": ["title", "type"]
		},
		"SimpleFormatItemChooseFromList": {
			"allOf": [
				{
					"$ref": "#/$defs/SimpleFormatItemBase"
				},
				{
					"properties": {
						"subtitle": {
							"$ref": "#/$defs/AttributedText"
						}
					}
				}
			]
		},
		"SimpleFormatItemFloatingMenu": {
			"allOf": [
				{
					"$ref": "#/$defs/SimpleFormatItemBase"
				},
				{
					"properties": {
						"width": {
							"type": "number"
						},
						"height": {
							"type": "number"
						},
						"templateitemuuid": {
							"type": "string"
						}
					}
				}
			]
		},
		"AttributedText": {
			"type": "object",
			"properties": {
				"text": {
					"type": "string"
				},
				"color": {
					"$ref": "#/$defs/Color"
				},
				"size": {
					"type": "number"
				}
			},
			"additionalProperties": false,
			"required": ["text"]
		},
		"SimpleFormatItemType": {
			"type": "string",
			"enum": ["standard", "separator"]
		},
		"IconDefinition": {
			"type": "object",
			"properties": {
				"type": {
					"type": "string",
					"enum": ["sfsymbol", "path", "base64"]
				},
				"value": {
					"type": "string"
				},
				"path": {
					"type": "string"
				},
				"base64": {
					"type": "string"
				},
				"weight": {
					"type": "string"
				},
				"size": {
					"type": "number"
				},
				"colors": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Color"
					}
				},
				"background": {
					"$ref": "#/$defs/Color"
				},
				"width": {
					"type": "number"
				},
				"height": {
					"type": "number"
				}
			},
			"required": ["type"]
		},
		"SetVariableDefinition": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"value": {
					"type": "string"
				}
			},
			"required": ["name", "value"]
		},
		"BaseAction": {
			"type": "object",
			"properties": {
				"setvariable": {
					"$ref": "#/$defs/SetVariableDefinition"
				}
			}
		},
		"NamedAction": {
			"allOf": [
				{
					"$ref": "#/$defs/BaseAction"
				},
				{
					"properties": {
						"named": {
							"type": "string"
						}
					},
					"required": ["named"]
				}
			]
		},
		"UUIDAction": {
			"allOf": [
				{
					"$ref": "#/$defs/BaseAction"
				},
				{
					"properties": {
						"uuid": {
							"type": "string"
						}
					},
					"required": ["uuid"]
				}
			]
		},
		"JSAction": {
			"allOf": [
				{
					"$ref": "#/$defs/BaseAction"
				},
				{
					"properties": {
						"js": {
							"type": "string"
						}
					},
					"required": ["js"]
				}
			]
		},
		"KeyboardAction": {
			"allOf": [
				{
					"$ref": "#/$defs/BaseAction"
				},
				{
					"properties": {
						"keyboard": {
							"type": "string"
						}
					},
					"required": ["keyboard"]
				}
			]
		},
		"ShortcutAction": {
			"allOf": [
				{
					"$ref": "#/$defs/BaseAction"
				},
				{
					"properties": {
						"shortcut": {
							"type": "string"
						},
						"input": {
							"type": "string"
						}
					},
					"required": ["shortcut"]
				}
			]
		},
		"BTTAction": {
			"allOf": [
				{
					"$ref": "#/$defs/BaseAction"
				},
				{
					"properties": {
						"btt": {
							"type": "string"
						},
						"input": {},
						"args": {},
						"json": {}
					},
					"required": ["btt"]
				}
			]
		},
		"Action": {
			"oneOf": [
				{
					"type": "string"
				},
				{
					"$ref": "#/$defs/NamedAction"
				},
				{
					"$ref": "#/$defs/UUIDAction"
				},
				{
					"$ref": "#/$defs/JSAction"
				},
				{
					"$ref": "#/$defs/KeyboardAction"
				},
				{
					"$ref": "#/$defs/ShortcutAction"
				},
				{
					"$ref": "#/$defs/BTTAction"
				}
			]
		},
		"ActionCategory": {
			"type": "string",
			"enum": [
				"standard",
				"hover",
				"longpress",
				"touchrelease",
				"hoverend",
				"hyperkeyrelease",
				"rightclick",
				"changetofalse",
				"appear",
				"disappear",
				"ondrop"
			]
		}
	}
}

```
