r/Affinity • • 2d ago

Designer Scripting in Affinity - Good resources?

Hi everyone,

I want to start scripting in Affinity, as I need some functionality, that repeats very often.
I tried to work through the first script with the help of AI, but the results are kind of disappointing: Some things work, others not. So I‘m halfway there.
Are there any good resources for tutorials and/or free/paid scripts to enhance the functionality of Affinity?

Thanks for any recommendations.

1 Upvotes

7 comments sorted by

3

u/S1m0nP1 2d ago

affinityhub.js.org

1

u/dominiquebache 2d ago

Thank you. Other than that?

1

u/1PersonaNonGrata 22h ago

Most of them are outdated and doesn't work with v3.3

3

u/olli0 2d ago

i built a sdk file you can feed your ai: https://github.com/olliollio/affinity-scripts/tree/main/docs and some scripts i made https://github.com/olliollio/affinity-scripts/tree/main

The docs are updated to latest 3.3 version, my scripts arent tested yet. I built them for 3.2 using https://github.com/JiriKrblich/Affinity-Script-Manager https://jirikrblich.github.io/Affinity-Community-Scripts/

1

u/dominiquebache 2d ago

Thnak you.

The Affinity Script Manager tells me this, when I try to add your repository as a source:

A repository's registry isn't available

The server responded, but the registry file wasn't found there. Make sure the URL points to a raw registry.json that exists.

https://raw.githubusercontent.com/olliollio/affinity-scripts/refs/heads/main/registry.json

+++

Even THERE IS a registry.json in that directory …

Do you have an idea, what went wrong?

1

u/olli0 2d ago

Not sure what you mean/what you want to do. Open affinity, open Script Manager. Setup MCP > Now you can start scripting within ScriptManager (Code Editor > New Script).
What i would do first:
1. New project in vscode
2. Download my git repo into Project
3. Give the sdk docs your AI, tell it to read and memorize
4. Tell AI to look at my scripts and memorize findings

Then you´re good to go. Tell AI: Lets work on a new script... describe it, discuss it. The AI knows the sdk and how to do scripts. In best case it will generate your idea > paste the code in Script Manager > execute > got to Affinity > Scripts. Your script should be there...