Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

Quelque soit le langage choisi, ce qui peut être intéressant est justement la vigueur de la communauté qui utilise ce langage et permet de le faire vivre et échange pour le rendre accessible au plus grand nombre.
Ce que chacun d'entre vous fait, en somme.

Whatever the language chosen, what can be interesting is precisely the strength of the community that uses this language and allows it to be lived and exchanged in order to make it accessible to as many people as possible.
What each of you does, in short.

Toujours pas !
Windows 10 Pro 21H2 - Intel Core i7-3630QM CPU @ 2.40GHz - 16 Gb Ram - GeForce GT 650M - Intel HD 4000
Affinity Photo | Affinity Designer | Affinity Publisher | 2

Link to comment
Share on other sites

Having scripting capabilities (whatever language), or at least having an API would be of course very useful. But I doubt we will see anything like that during the next years, thus it will probably be pretty much the same as with other urgent feature wishes too.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

On 9/23/2020 at 11:59 PM, fde101 said:

Even when people try to design languages that are hard to use they still tend to wind up creating something that is more consistent with itself than ECMAScript/JavaScript is.

And yet, this particular "feature" has given us a lot of awesome technologies that browsers and virtual machines use currently, which might not have happened if JS was designed well from scratch :)

A website can currently run arbitrary code on your GPU without having it escape its sandbox. You can run interpreted code with crazy performance. And so on.

All programming languages suck in one way or another. All people have preferences and opinions which languages suck more than the others. That's why discussing this is pointless. Especially that a good API should be designed as language-agnostic, and then bound to preferred languages, or enable wrapping itself to anything meaningful. Python or JS today, Haskell or Rust tomorrow, design it well once and you won' t have to do it again. 

Link to comment
Share on other sites

  • 4 weeks later...

I've given up on Affinity.

I started this thread over two years ago with great hope of replacing CC but there's been zero input from Affinity regarding progress on scripting which gives me little confidence anything will be coming. 

It seems the primary market for Publisher, Designer etc is smaller agencies who might not benefit greatly from scripting. I continue to tweak our InDesign scripts and software every few weeks and I just can't see how we could survive doing everything manually. I'm retiring from the trade next year so it's not going to be relevant to me anyway, but it's a shame it doesn't seem to be on the radar of important features.

Link to comment
Share on other sites

I think the best approach is server/client. Discord did it this way, and in their Discord's server, they have separate channels for each programming language that have a Discord Client API, and you can even request a channel if there's a language that doesn't have one, but is active and you want to work on the API for said language.

This way, everyone can enjoy controlling Affinity Suite programs from their favorite languages, and then the debate is over. No more "my language is better than your language" silly arguments.

You start the server with a button or menu option in the Affinity programs, then in your favorite language, install the affinity client library, import it, connect to the server, and start calling the methods that will send messages via Sockets or HTTP requests, to the server, and the server then process the messages and send the actions to the program.

I expect this on version 2.0 if I will spend money to upgrade.

Link to comment
Share on other sites

1 hour ago, kimtorch said:

I've given up on Affinity.

I started this thread over two years ago with great hope of replacing CC but there's been zero input from Affinity regarding progress on scripting which gives me little confidence anything will be coming. 

It seems the primary market for Publisher, Designer etc is smaller agencies who might not benefit greatly from scripting. I continue to tweak our InDesign scripts and software every few weeks and I just can't see how we could survive doing everything manually. I'm retiring from the trade next year so it's not going to be relevant to me anyway, but it's a shame it doesn't seem to be on the radar of important features.

I do empathize greatly. I've been investing some time in workarounds. One of my InDesign scripts, for example, was a barcode generator. Instead, I'm converting it to a shell script to generate an SVG image, and then I'll just place the image into a Publisher document . . . but it's definitely a substandard workaround. Not having scripting really makes it hard to shift entirely away from InDesign. But I'm also really tired of the increasing random Adobe is demanding just to have access to my documents. (Similarly, not supporting right-to-left text is a major bummer, since one of my projects involves Semitic languages.) I like that it does 90% of my work-a-day stuff, but that last 10% is presently pretty painful.

Link to comment
Share on other sites

  • 1 month later...
On 10/22/2020 at 2:41 AM, angelhdz12 said:

I think the best approach is server/client. D

It is what I suggest too. Possibility coding with your favorite language is something what no any before use and it is huge adventage. When user can create freelly extensions to use inside Affinity Suite is something spectacular. Only problem will be I know JS, you Python - we create script and we can exchange it. So then maybe is third solution.

Generate code from your lang and Affinity Suite it will be interpret it. Simple procedural aproach

command

command

and eventually simple loops and If implement?

 

Canvas.Resize(100,200)

Text.SetPosition(10,20)

Text.Color = Panteone(23)

Text.Font="Arial"

Text.Text = "Affinity Automation"

Link to comment
Share on other sites

  • 1 month later...

Any news on scripting and/or command line support? We really need an alternative to Indesign server for smaller projects. 6500 euro/year for an Adobe license is not realistic in smaller European countries with smaller companies and budgets ... Any news on scripting and/or command line support? We really need an alternative to Indesign server for smaller projects. 6500 euro/year for an Adobe license is not realistic in smaller European countries with smaller companies and budgets ... 

Link to comment
Share on other sites

On 2/4/2021 at 10:33 AM, BennyD said:

Still no scripting in 1.9?
Man, what are you doing over there?

I hope they add scripting it in 2.0 or 2.5 top. Otherwise I'm not paying for version 2x.
So many expected and needed features missing like Layers filtering/search, Non-destructive Mesh Warp, Trace bitmap, 

- Multiple Effects/Fills/Strokes per shape

- Convert Pixel selection to Vector shape/path

-Mesh fill tool

-Knife tool

-Calligraphic line styles

 

Link to comment
Share on other sites

18 hours ago, angelhdz12 said:

- Multiple Effects/Fills/Strokes per shape

As far as I know this feature (at least as fills and strokes are concerned) has been added in version 1.8.

Effects like those in Illustrator would be highly welcome, though!

Link to comment
Share on other sites

9 minutes ago, Lorox said:

As far as I know this feature (at least as fills and strokes are concerned) has been added in version 1.8.

Effects like those in Illustrator would be highly welcome, though!

May you tell me how to add more than 1 stroke to a shape in Designer? I don't see it. Thank you!

About the multiple FX per object, we can currently add only 1 of each effect. For example if I want to add 2 outer shadows of different colors, I would have to make my object a group and then apply the 2nd outer shadow.

About "multiple fills" I took that suggestion from someone else... but I'm now curious if I ever need to add multiple fills to different parts of a shape... hmmm.

Stay safe!

Link to comment
Share on other sites

15 minutes ago, angelhdz12 said:

May you tell me how to add more than 1 stroke to a shape in Designer? I don't see it. Thank you!

Via tthe Appearance panel in the studio.

https://affinity.help/designer/English.lproj/pages/Panels/appearancePanel.html

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

15 hours ago, angelhdz12 said:

I would have to make my object a group and then apply the 2nd outer shadow.

The obvious limitation of this approach is that the second shadow will include a shadow of the first shadow.

If you want two shadows that are cast in different directions (to reflect two light sources at different angles) this approach won't really work for that.

Link to comment
Share on other sites

9 hours ago, fde101 said:

The obvious limitation of this approach is that the second shadow will include a shadow of the first shadow.

If you want two shadows that are cast in different directions (to reflect two light sources at different angles) this approach won't really work for that.

Thank you mate. But we are derailing of the main topic he he.

I just wanted to mention some missing features alongside with Scripting. 

By the way, what's your position about Scripting, and how to address it? 

Cheers

Link to comment
Share on other sites

5 hours ago, angelhdz12 said:

By the way, what's your position about Scripting, and how to address it? 

I've replied several times already on this.

I think Serif should come up with a solid DOM to expose, use that as the basis of an SDK for (compiled/programmer) plugins, and also build the scripting API on that DOM.

I don't particularly like *any* scripting language I have come across to date (and I've seen quite a few); ECMAScript (JavaScript) is ubiquitous but is a royal mess, and I really hate Python; of the ones out there I would suggest looking at Lua as one of the least problematic: it is small, fast and simple, is designed from the ground up for embedding into applications, and has an open-source license which is friendly to use in commercial applications.  It should be among the easiest to work with.

In addition to a language embedded in the Affinity apps themselves, it is *critical* that Serif provide some level of support for the OS-level languages: OSA (AppleScript) on the Mac and WSH on the other platform.  That support could be as rudimentary as "run Lua code" as long as a means is provided to efficiently pass arbitrary information between that Lua code (or whatever language they wind up embedding) and the OS-level scripting languages (though exposing the same DOM to the OS-level scripting languages would obviously be much better from a user standpoint).  Supporting this is important because it enables interactions between the Affinity applications and other 3rd-party applications in joint workflows, which a language embedded within the Affinity apps themselves would struggle to be able to do.

I do NOT think it is a good idea for the Affinity apps to act like servers for outside scripting engines to connect to arbitrarily as some have suggested, as that is likely to lead to future security holes and creates more complexity than value, though there is nothing keeping those languages from accessing the apps using the OSA/WSH mechanisms provided by the OS.

Link to comment
Share on other sites

On 2/9/2021 at 2:26 AM, fde101 said:

I've replied several times already on this.

Do you think this could be summarized as below?

1. We need a language-agnostic scripting interface thats:
- officially supported for a few main languages (AppleScript, VBA, JS - for compatibility reasons with Adobe apps, for out-of-the-box deployment and seamless integration with existing solutions)
- documented well enough so we can write libraries/packages for other languages (Python, Lua, etc - means opening up to community support, maybe?)

 

On 2/9/2021 at 2:26 AM, fde101 said:

I do NOT think it is a good idea for the Affinity apps to act like servers for outside scripting engines

Having deployable network instances, alike Indesign Server, would be cool though. You could just push computationally intensive worktasks and batch operations to a network instance without occupying the local machine. Its orthogonal to apps acting like servers, just a thought.

 

I think we should focus on features rather than technical means of how to achieve them. If Serif decides to implement a scripting feature, it's probably going to be dependent on the internal architecture of the apps, and long-term support by the programming team. Suggesting technical solutions of a problem is impossible without knowing the underlying constraints.

Besides, this thread is 2 years old, and Serif may have already done work on it that renders this discussion invalid.

Calling @Patrick Connor :) Is it possible for you, or anyone at Serif, to give us any updates on a scripting feature, or a current/planned functional equivalent?

original post:

 

Link to comment
Share on other sites

13 hours ago, michalmph said:

for compatibility reasons with Adobe apps

Providing support for OSA/WSH has nothing to do with Adobe compatibility and would not automatically provide for that.

It has everything to do with being able to integrate multiple applications together into an automated activity.

 

13 hours ago, michalmph said:

documented well enough so we can write libraries/packages for other languages

That could potentially be provided for via the SDK previously mentioned.

 

13 hours ago, michalmph said:

Is it possible for you, or anyone at Serif, to give us any updates on a scripting feature, or a current/planned functional equivalent?

As a general rule they rarely do that until it shows up in a beta, so don't hold your breath waiting for a response.

They used to provide more info along those lines but have as a policy changed that because it was causing various problems.

Link to comment
Share on other sites

On 6/25/2020 at 7:45 PM, sfriedberg said:

Everybody has a favorite scripting language, Frank.  But no scripting language is everybody's favorite.

In practice, the Affinity document/object API and its binding to the scripting language is going to be far more significant than the language itself.  An incomplete, poorly organized and badly documented API/DOM will be agony to use in any scripting language.  Conversely, a comprehensive, modular and well-documented API/DOM will be easy to use in any scripting language.  We don't need Serif to give us Python, or Lua, or Perl, or ECMAScript, or FORTH, etc.  We need them to give us an API.

Yup. Local server with REST API or Socket HTTP requests. Then they build the API guidelines and we can build the clientside API in any flavor (language) we want.
Just like Discord. They have a server dedicated to all the languages they support for their Bot Clients. And we can request a new language and if it fulfills the requirements they make a channel for it. 
The guidelines are very clear and easy to follow. 

They support python, C#,  javascript, dart, clojure, go, java, elixir, php, julia, lua, ruby, scala, swift, typescript.

Easy. No languages war.

Link to comment
Share on other sites

With scripting even parametric object alignment could work.
Not only to avoid current "Transform Separately" + "Lock" limitations ...

… but to enable this for instance:

https://observablehq.com/@znah/gradient-toys-with-tf-js

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.