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

Apple Script


Recommended Posts

AppleScript support really just means that the application has a set of App Events that is has implemented. The scripting itself can be done in either AppleScript or JavaScript. It's also fairly trivial to call these scripts from Python using the osascript utility. In theory, you can implement OSA bindings directly in Python, but all the implementations that I'm aware of are outdated and unsupported.

Link to comment
Share on other sites

Think global ... considering AP and AD supports iOS and Windows it would only make sense to support a common script language (e.g. JavaScript ... Python might do as well, but it's by far not as well known ...)
btw: what is "AppleScript" ? Text written by a fruitpen? *bg*

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

 Python might do as well, but it's by far not as well known ...

 

Are you serious ? Python is used in a lot of CG industry, nearly all high-end software (maya, 3dsmax, Nuke etc) have python API, it is THE standard in this industry.

intel i7-3930K - 32Go - SSDs | Dual screen | Running last customer beta

Win 7 Pro SP1 x64 | nVidia GTX 680 - v376.33 | intuos 3 - v6.3.15-3

Link to comment
Share on other sites

Are you serious ? Python is used in a lot of CG industry, nearly all high-end software (maya, 3dsmax, Nuke etc) have python API, it is THE standard in this industry.

I know ... but I said "It's by far not as well known" ... want to start a survey how many JavaScript programmers vs. Python programmers are around? ;-) ... Considering that both languages will be good for the task, I'd prefere the language that is spread more widely ... (but honestly, it really doesn't matter that much looking at the tasks to achieve).

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

Well, nowadays I code mainly in python and C++.

I code scripts and plugins for Cinema 4D. I have a choice of using COFFEE (almost exactly the same as javascript), python and C++.

I used to code in COFFEE/javascript but since I had an option to use python, I almost completely ditched COFFEE/javascript because python is so, so much better.
And I only use C++ when I need the extra speed and to access data structures and libraries that are still not yet available to python.

So, python would be the best option. It is multi-platform and so powerful.

 

Oh, by the way, I'm not a programmer. I'm just a graphic designer that is also a tremendous geek ;)

Link to comment
Share on other sites

Well, I would even not compare javascript and Python ... Python is so much more powerful, easy to learn, efficient, more readable, and a standard for such softwares. Adobe is using Javascript, this should be a sign lol !

intel i7-3930K - 32Go - SSDs | Dual screen | Running last customer beta

Win 7 Pro SP1 x64 | nVidia GTX 680 - v376.33 | intuos 3 - v6.3.15-3

Link to comment
Share on other sites

Tying the scripting infrastructure to a particular language is dumb. Every platform has its own application scripting infrastructure so hopefully the Affinity team is on the ball enough to just use the native mechanism for the platform. Failure to do so would be pretty inconvenient since a big use case for application scripting is to provide adhoc integrations between applications.

Link to comment
Share on other sites

So we are talking about totally different things.

automation and API have nothing comparable. Automation basically simulate click in the UI, really good for very basic stuff. A python API would allow you to access core features, doing a lot more, creating plugins to do stuff impossible, etc. We develop lot of pipeline tools, integration tools and plugins with python in such apps, it has absolutely nothing to do with automation. You could for example parse any file format to import stuff Affinity never though about, write your own format to integrate with other tools, etc. Or enter some metadatas in documents, connect them with your team database for artistic direction tools,etc. No limit !

intel i7-3930K - 32Go - SSDs | Dual screen | Running last customer beta

Win 7 Pro SP1 x64 | nVidia GTX 680 - v376.33 | intuos 3 - v6.3.15-3

Link to comment
Share on other sites

...but this thread is titled "Apple Script". Which is one of the OSX automation languages. The OP specifically asked about Apple Script and then this thread filled with people talking about Python, which was, to say the least, confusing. If you want access to internal APIs for building your own Affinity plugins or whatnot, that's great, but what OP was talking about is an automation tool with which, presumably, he or she would like to automate some task.

Link to comment
Share on other sites

We have had these discussions in other threads already. Automating tasks is possible with Python as well, but Apple Script (which I personally find really confusing in terms of syntax) ultimately means support for platform-specific automation interfaces on the Mac, including support for tools like the discontinued Apple Automator. So depending on the intention of the feature request, Python may or may not be a viable alternative.

 

While I think Python would be fantastic because it is equally well-suited for simple and easy tasks that a beginner with very little programming experience might want to tackle, to complex seamless integration that would require lower-level C++ plug-ins in other software, I think it might be more constructive for us to talk about what type of automation and workflows we are trying to solve, rather than request specific technologies.

 

So looking at the original post, are we talking about requests for AppleScript because of Mac users' familiarity with the language? Or is it a request for a way to automate things where calls have to be made to multiple different programs, rather than just Affinity itself? Or is it simply about having robust scripting capabilities, regardless of language?

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.