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

Recommended Posts

7 hours ago, GhostlyCat said:

 

IMHO (!) supporting AppleScript (or the OSA architecture) is somewhat of hitting a dead horse. It's still used in macOS but not available on even iOS/iPadOS... and very likely never will be, since Apple seems to put their energy into "Shortcuts". OSA isn't the nicest of APIs to support. Don't get me wrong - there is nothing announced yet that would call out for an end of OSA, but from a developers perspective the signs are there.

@jbmanos description about object models is a bit misleading... (I might have misunderstood him though) this is NOT something that is "just there" in macOS - it's something you need to actively implement and the application needs to be written to support this. The biggest downside is that this will only work for macOS and not even for iPadOS (not even think about Windows) so it boils down to an economic question... It works in Adobe and MS apps because they are able to throw a hundred developers on their macOS application ports who will implement this even if it will do nothing for non macOS users.

In

 

I only say what Steve Jobs said of it when describing the NS architecture.  The same description is repeated in the OSA release and by the apple automation guys since I can remember all the way back to system 7 and 8.  if this were an MVC, the concept is literally that OSA is an alternate to the VC of the UI.   That’s how it’s supposed to be viewed and implemented through the SDEF.   It’s scary that Adobe is a better player here than Apple itself. 
 

it’s not dead - applescript 2 has been a dead man walking for 20+ years now.  JXA is more dead than applescript - it was faintly released, had a bunch of promise but it gets less discussion than Applescript (!).  Perhaps the biggest reason is the ASobjC opens the entire NS foundation and OS and added frameworks to it.  Shortcuts, as they are now, are nowhere near what OSA is
 

This is why I bring it up, however - power users may be few - probably less than .1%, but people who use it - like me - become evangelists for apps that are fully baked (Devonthink and Adobe are great examples - and surprisingly Pixelmator Pro - you know, the affinity competitor from an even smaller shop than Serif).   I know more than one shop that stays on Adobe because their shop automation more than pays for the enterprise licensing.  And what’s best for them is that half their office can write, maintain, and improve their own automation objects because applescript is so easy.  

for instance, chugging an invoice for a client through their InDesign happens without anyone opening excel, FileMaker, or indesign itself    Same with sending a comp sheet to a client - click a droplet, select client and project from a list and everything happens in a predictable, same quality every time, polished way…  

Meanwhile, as I said above - scripting within the app is another no brainer - but let’s not poo poo Applescript without understanding just what it is and how commercially valuable it actually can be - even a single designer shop could do the work of an agency with simple automation that’s easy to understand and maintain.   That’s what applescript does.  That’s also why I know several designers that like affinity but can’t justify switching because it would wreck how easy the workflows have made the admin side of design agency.   

Link to comment
Share on other sites

9 hours ago, jbmanos said:

I only say what Steve Jobs said of it when describing the NS architecture.  The same description is repeated in the OSA release and by the apple automation guys since I can remember all the way back to system 7 and 8.  if this were an MVC, the concept is literally that OSA is an alternate to the VC of the UI.   That’s how it’s supposed to be viewed and implemented through the SDEF.   It’s scary that Adobe is a better player here than Apple itself. 

It's not that different between Apple and Microsoft here. If your application model perfectly fits the OS application architecture and you only have to support one single OS, then you can just implement it straight forward in a way that makes OSA support (or COM/OLE) relatively easy. Easy... for an API that got developed 32 years ago and which predates anything that happened with the Internet and the mobile world since then.

If you model doesn't fit perfectly, this doesn't mean that it is not possible to implement OSA for it - it just depends how flexible your application architecture is developed. For nearly any non-trivial application this is the case. Don't get me wrong - I don't say that it is "to difficult" or anything like that - I'm just sceptical about marketing drivel about things like this because I know this things in reality and beyond keynote demos.

9 hours ago, jbmanos said:

it’s not dead - applescript 2 has been a dead man walking for 20+ years now.  JXA is more dead than applescript - it was faintly released, had a bunch of promise but it gets less discussion than Applescript (!).  Perhaps the biggest reason is the ASobjC opens the entire NS foundation and OS and added frameworks to it.  Shortcuts, as they are now, are nowhere near what OSA is

Every time I used it I - at the same time - did marvel the possibilities and curse the peculiarity and fragility of it. Sadly it's a technology that shows its age. It's indeed a dead man walking. And knowing how it works makes clear that it will never will go beyond the Mac and it might even go to the happy hunting ground following so many Apple technologies in the past. Not today. Not tomorrow... but it will happen.

Shortcuts is really young, but it is also extremely promising. It's much (!) easier to support (imho). Supporting it would work not only on macOS but also the iPad... which is a _very_ important platform for Affinity. Thats way I think Shortcuts is more important than OSA. Which does not mean that I would oppose OSA capability of macOS Affinity.

9 hours ago, jbmanos said:

This is why I bring it up, however - power users may be few - probably less than .1%, but people who use it - like me - become evangelists for apps that are fully baked (Devonthink and Adobe are great examples - and surprisingly Pixelmator Pro - you know, the affinity competitor from an even smaller shop than Serif).   I know more than one shop that stays on Adobe because their shop automation more than pays for the enterprise licensing.  And what’s best for them is that half their office can write, maintain, and improve their own automation objects because applescript is so easy.

for instance, chugging an invoice for a client through their InDesign happens without anyone opening excel, FileMaker, or indesign itself    Same with sending a comp sheet to a client - click a droplet, select client and project from a list and everything happens in a predictable, same quality every time, polished way…  

Again: Don't get me wrong - it is very very useful... 

Pixelmator Pro... you mean the thing that still isn't on iOS and never was ported to Windows?

DevonThink which doesn't support AppleScript (and many other things the Mac version has)?

Affinity is a first class citizen on iPad and not some crippled afterthought.

 

9 hours ago, jbmanos said:

Meanwhile, as I said above - scripting within the app is another no brainer - but let’s not poo poo Applescript without understanding just what it is and how commercially valuable it actually can be - even a single designer shop could do the work of an agency with simple automation that’s easy to understand and maintain.   That’s what applescript does.  That’s also why I know several designers that like affinity but can’t justify switching because it would wreck how easy the workflows have made the admin side of design agency.   

As I've written - it is just my opinion that AppleScript and OSA is on the way out and Shortcuts the thing that is getting traction. Of course this is just one view on this topic. I indeed might make sense to support OSA if a big part of Affinity customers are Mac-only.

So I'm not opposed to supporting OSA, but I prefer Shortcuts support because I use both: macOS and iPadOS on a daily base.

Link to comment
Share on other sites

5 hours ago, GhostlyCat said:

Pixelmator Pro... you mean the thing that still isn't on iOS and never was ported to Windows?

DevonThink which doesn't support AppleScript (and many other things the Mac version has)?

Affinity is a first class citizen on iPad and not some crippled afterthought.

Devonthink has always had awesome app suites for OSA land.  You’re quite mistaken.   
 

same with being mistaken about Pixelmator pro.  It’s a macOS app and has several extensive OSA suites. 
 

shortcuts may be nice but if they will ever be anything, they will tie into the OSA also. 

Link to comment
Share on other sites

  • 4 weeks later...

What I immediately see as missing are:

  1. The ability to rename a selection of Layers.
    • Useful for exporting slices in the Export Persona.
    • Useful for stripping out the file extensions in Placed images.
  2. Integration with Find and Replace in Publisher.
    • Useful for replacing Placed text's formatting with named premade Paragraph and Character Styles in Publisher.
    • Useful for reusing complex RegEx Find and Replace.
  3. Could it go through a Publisher document and find all the images in the whole document, preferably do it section by section?
    • Useful for gathering them into individually named folders.

 

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

  • Staff
11 minutes ago, Old Bruce said:

What I immediately see as missing are:

What? Almost everything is missing, this is not releasable! it's a demonstration

1 hour ago, Tim France said:

I'm not claiming any of these examples are particularly useful on their own; they're just to demonstrate some basic scripting functionality.

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

1 hour ago, Tim France said:

I thought I'd give you a quick progress update and let you see some of things we've been working on at Serif Labs.

Fine, even you are at early stages here, I hope you can make some good fluid progress.

1 hour ago, Tim France said:

We now have a scripting core that we're reasonably happy with and have put together a little test area where we can run Javascript code ...

Let's give you one two ideas, of what capabilities/possibilities would be fine to have here in conjunction some day in the future then too.

  1. Not just relying on an internal (inside the GUI apps) execution engine. Meaning here, it would be nice to also be able to execute JS scripts via common CLI command line based execution processing, so without having to start the GUI always at all. - In this context think about how one would use ImageMagick here.
  2. Offering to reuse also external JS modules together for interoperation.
  3. Offering to hook in with, or to run inside a debugger, for the development of more complex scripts. So one can set breakpoints, inspect values, single step into and over the JS code etc.

☛ 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

This is fantastic stuff @Tim France thanks for sharing!

It's hard to tell form those videos what fully going on, but as means of feedback, or a reminder, it would be useful to have access to the file system. I don't know if you'll be implementing just an engine like V8 or an entire runtime like node, but it would be good to be able to read/write from/to the filesystem in order to implement custom importers/exporters

Link to comment
Share on other sites

  • Staff
30 minutes ago, v_kyr said:

Fine, even you are at early stages here, I hope you can make some good fluid progress.

Let's give you one two ideas, of what capabilities/possibilities would be fine to have here in conjunction some day in the future then too.

  1. Not just relying on an internal (inside the GUI apps) execution engine. Meaning here, it would be nice to also be able to execute JS scripts via common CLI command line based execution processing, so without having to start the GUI always at all. - In this context think about how one would use ImageMagick here.
  2. Offering to reuse also external JS modules together for interoperation.
  3. Offering to hook in with, or to run inside a debugger, for the development of more complex scripts. So one can set breakpoints, inspect values, single step into and over the JS code etc.

Nothing is off the table, but we're only just getting started. All 3 of those are things the team has discussed at some point.

Link to comment
Share on other sites

  • Staff
4 minutes ago, DiegoBM said:

This is fantastic stuff @Tim France thanks for sharing!

It's hard to tell form those videos what fully going on, but as means of feedback, or a reminder, it would be useful to have access to the file system. I don't know if you'll be implementing just an engine like V8 or an entire runtime like node, but it would be good to be able to read/write from/to the filesystem in order to implement custom importers/exporters

Yeah, I appreciate the gifs aren't great, so that's why I added the mov attachments so you could take a look at the code.  We do have an fs module and it's loosely based on node's, but I feel I should reiterate the disclaimer that none of this is guaranteed to stay in its current form.  If you look at emoji.mov, you'll see

let table = fs.readFileSync('/Users/tim/Documents/emoji-translations.csv')
  .toString('utf8')
  .split('\n')
  .map(line => line.split(','))
  .filter(arr => arr.length == 2);

We've got the callback version of read, write etc. too.  We aren't going to be node, nor are we going to try and be a web browser, but we will likely draw inspiration from both.

Link to comment
Share on other sites

@Tim France It must feel great feeling to be able to show off your project!

My hope is that Serif can make scripts easy enough to package for time-limited designers and thus install/uninstall someplace, similar to add-ons. (Leaving us with a similar console window for paste-in code for the advanced user would be nice also though, Tim!) The ball demo shows there's possibility of creating a browser simulated DOM of sorts within the program. A light UI/wireframe tool maybe?

What I will say will already be useful (from the scripter's POV) will be to write in a "snapping" functions. ie Snap select and selected nodes to pixel grid. Would need arguments for the round-down/round up operations, etc, but I can see that being incredibly useful for speeding up hinting work... also a tool for checking art-board pixel alignment...

Will we will be able to create our own tools (ie basically add an icon to tools itself). We will be able to build our own panels? Sorry for the questions... let me know where I can send a cuppa 🏆 (Edit: That would make a good post reaction emoji, honestly...)

Link to comment
Share on other sites

  • Staff
50 minutes ago, debraspicher said:

My hope is that Serif can make scripts easy enough to package for time-limited designers and thus install/uninstall someplace, similar to add-ons. (Leaving us with a similar console window for paste-in code for the advanced user would be nice also though, Tim!) The ball demo shows there's possibility of creating a browser simulated DOM of sorts within the program. A light UI/wireframe tool maybe?

Yes, there will be some notion of a plugin / add-on package and they won't have to be single-execution-and-stop scripts like in these examples.

50 minutes ago, debraspicher said:

Will we will be able to create our own tools (ie basically add an icon to tools itself). We will be able to build our own panels? Sorry for the questions... let me know where I can send a cuppa 🏆 (Edit: That would make a good post reaction emoji, honestly...)

I'm not in a position to promise anything (even with the bribe of a cuppa) but we have done some work on panels because it feels like having some built-in support for UI would be of value.

Link to comment
Share on other sites

4 minutes ago, Tim France said:

Yes, there will be some notion of a plugin / add-on package and they won't have to be single-execution-and-stop scripts like in these examples.

Yes, this will be great. Ultimately what will make Affinity a top tier platform will be having a marketplace for plugins/scripts. So that you can just click a button and add a feature/script to your application. Just like in the VSCode editor. As a developer myself, this would be very exciting to be able to start providing enhancements for Affinity.

Quote

I'm not in a position to promise anything (even with the bribe of a cuppa) but we have done some work on panels because it feels like having some built-in support for UI would be of value.

I know we can't everything at once, but yes this would allow for a much better and integrated experience for script and plugins. Having that professional level of integration where we can add capabilities that just naturally fit into the workflow and new buttons, menus, context selections etc are available where they should be.

Link to comment
Share on other sites

2 hours ago, Tim France said:

...All 3 of those are things the team has discussed at some point.

It's important to not be too restricted from ground up here (aka not making for example the same limitation decisions as with the APh Macro facility), since the scripting interface could then be used for much more and even new functionality, than the Affinity apps do initially offer themself out of the box here. - As far as one can use external modules, custom I/O and a bunch of other things too on demand. At a later stage for developing interactive GUI scripts, also some access to some base widgets will be needed, which ideally then should follow the Affinity app setup UI style in l&f.

I know you are still at very early stages, but it's better to remind early to keep the interface design as flexible and powerful as possible for future demands!

☛ 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

I'm pleased to see some progress but - I'm sorry - a little underwhelmed by the examples. As a publishing company our primary tool is InDesign. Our priority for scripting is Publisher and things like placing and formatting text, importing tagged text, archiving files, creating PDFs, exporting for web etc.

Creating grids and designs is 'pretty', but it's of zero interest to us compared to the aforementioned text and document processing which happens every minute of every day and is where the real time savings are. I appreciate others may feel differently, but as a working publishing company I'm focused on the greatest savings we can get.

Thanks for the update but I'll reserve any 'excitement' for when you can demonstrate some productivity scripts in Publisher.

Link to comment
Share on other sites

17 minutes ago, kimtorch said:

I'm pleased to see some progress but - I'm sorry - a little underwhelmed by the examples.

Hello @kimtorch,

Tim and Patrick went to great lengths to stress the fact that this is just a very early pre-pre-pre-alpha, of what they are working on. This is not representative of what we get when this is released.

And secondly, as far as I remember the team is also working on a C based extension system. For companies that need greater automation this plug-in system might be more suitable. 

2017 27” iMac 4.2 GHz Quad-Core Intel Core i7 • Radeon Pr 580 8GB • 64GB • Ventura 13.6.4.

iPad Pro (10.5-inch) • 256GB • Version 16.4

Link to comment
Share on other sites

1 hour ago, kimtorch said:

As a publishing company our primary tool is InDesign. Our priority for scripting is Publisher and things like ...

Pfff and the next one who comes in will then for sure tell here instead ...

Quote

 

As a Pro Photo Studio our primary tool is Photoshop. Our priority for scripting is Photo and things like developing RAW files, adding meta data, importing LUTs, archiving files, creating high resolution image prints, exporting for web etc.

Creating documents and text processing is 'pretty', but it's of zero interest to us compared to the aforementioned raw and image processing which happens every minute of every day and is where the real time savings are. ...

Thanks for the update but I'll reserve any 'excitement' for when you can demonstrate some productivity scripts in Photo.

 

... well, such sort of postings are often the reason, why people here in the forum afterwards wonder, why they won't get any further infos about certain future app development stages and progress!

And here freely reproduced from "the Sorcerer's Apprentice"

...
Lord and master, hear my call!
Ah, here comes the master!
I have need of Thee!
from the spirits that I called
Sir, deliver me!

...

☛ 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

9 hours ago, Tim France said:

Hi folks,

I thought I'd give you a quick progress update and let you see some of things we've been working on at Serif Labs.  We now have a scripting core that we're reasonably happy with and have put together a little test area where we can run Javascript code, so I thought I'd show you some of that. Things to note:

  1. This is all VERY early, like pre-pre-pre-alpha.
  2. The JS API is extremely fluid and is constantly changing.
  3. This is not how the Affinity suite will run scripts and plugins; it is just a sandbox window for internal testing.
  4. There is still a huge amount of work to be done. I can't provide any timescales for when scripting will be publicly released, for Beta or Retail.
  5. Constructive feedback is welcomed, but I won't be able to answer all questions - see previous points.
  6. I'm not claiming any of these examples are particularly useful on their own; they're just to demonstrate some basic scripting functionality.
  7. Re Javascript async - yes, we support it, I've just not recorded anything yet. The sleep calls are there for screen-recording purposes only.

Here are some demos as low-res gifs. If you want to take a closer look, movs are attached.

Create a Mandelbrot image

image.gif

Some dodgy physics

image.gif

Insert a dragon curve

image.gif

"Emojification" (translation?) of text

image.gif

Create a grid of colours

 image.gif

Select and hide based on hue

image.gif

Replay a document's edit history

image.gif

mandelbrot.mov 13.35 MB · 10 downloads

balls.mov 6.73 MB · 7 downloads

dragon.mov 3.34 MB · 7 downloads

grid.mov 5.37 MB · 6 downloads

hue.mov 2.1 MB · 7 downloads

replay.mov 9.03 MB · 8 downloads

emoji.mov 2.64 MB · 9 downloads

Looking good! Question, how will we be able to access the API for different operators inside of Affinity? One thing I always appreciated when using Blender and Maya is that every action taken is actually recorded as a coding command. I.e. changing the position of an object, using modifiers, etc. get recorded in a timeline and you can also right click any button, slider, etc. to copy the code to run that operator. Would really help open up the API to casual coders if we can very clearly see what code we need to do specific stuff.

Also, will switching modes be supported as well? For instance, let's say I am doing something in Designer/Designer Persona and I wish to access Photo/Photo Persona for specific operators, will I be able to program it so Affinity opens up what I need to access it if I own the necessary software?

Would be cool as well if we could create new operators that can be put into the current UI and even make shortcuts for them in all the accessible menus. 

I happen to know a guy who wishes to get started on a basic animation timeline for Affinity once there is a scripting API established. Will that be possible too? 

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.