AngryKiwee Posted October 28, 2016 Share Posted October 28, 2016 Hey guys, Just out of curiosity what programming language is Affinity Designer and Photo written in for Windows? You guys using C++ Are we going to be able to write our own scripts with Python by any chance? as it's a bit simpler than Javascript I find. Thanks :) Petar Petrenko 1 Quote Link to comment Share on other sites More sharing options...
Staff TonyB Posted October 28, 2016 Staff Share Posted October 28, 2016 Hey guys, Just out of curiosity what programming language is Affinity Designer and Photo written in for Windows? You guys using C++ Are we going to be able to write our own scripts with Python by any chance? as it's a bit simpler than Javascript I find. Thanks :) Affinity is mainly written in C++ with the Mac version front-end written in Objective C. Scripting will be Java script as we feel this will cover the largest use cases people want. AngryKiwee 1 Quote Link to comment Share on other sites More sharing options...
AshTeriyaki Posted October 28, 2016 Share Posted October 28, 2016 Hey Tony, Could you elaborate a little on the decision to choose javascript? Quote Link to comment Share on other sites More sharing options...
AngryKiwee Posted October 29, 2016 Author Share Posted October 29, 2016 Thanks alot Tony, So no future plans for python support? Quote Link to comment Share on other sites More sharing options...
vishal Posted October 29, 2016 Share Posted October 29, 2016 Good to hear the scripting will be in javascript. Any idea when this scripting is going to be available ? Quote Link to comment Share on other sites More sharing options...
rui_mac Posted October 30, 2016 Share Posted October 30, 2016 I would also prefer python, but javascript is good also. When will we get scripting available? Any timeframe? And, will the scripting just be a glorified "macro" with possibility to add conditionals or will we be able to add new tools and/or commands through scripting? Petar Petrenko and AngryKiwee 2 Quote Link to comment Share on other sites More sharing options...
AngryKiwee Posted October 30, 2016 Author Share Posted October 30, 2016 I would also prefer python, but javascript is good also. When will we get scripting available? Any timeframe? And, will the scripting just be a glorified "macro" with possibility to add conditionals or will we be able to add new tools and/or commands through scripting? Great question, I would like to know this also. :) Quote Link to comment Share on other sites More sharing options...
JT_Allen Posted February 11, 2017 Share Posted February 11, 2017 This is definitely a great questions to ask. I know plenty of sites I could learn Javascript from. Quote Link to comment Share on other sites More sharing options...
MJSfoto1956 Posted February 11, 2017 Share Posted February 11, 2017 In theory it's possible to write a Python wrapper around Javascript. Quote Link to comment Share on other sites More sharing options...
cekuhnen Posted February 11, 2017 Share Posted February 11, 2017 interesting choice for JavaScript. most design tools I use use Python for scripting Maya Blender Fusion ... Petar Petrenko 1 Quote Claas Kuhnen Faculty Industrial Design - Chair Interior Design - Wayne State University Owner studioKuhnen - product:interface:design Link to comment Share on other sites More sharing options...
desult Posted February 11, 2017 Share Posted February 11, 2017 interesting choice for JavaScript. most design tools I use use Python for scripting Maya Blender Fusion ... add Krita to that. I too would be much more excited about Python, not so much for Javascript. I guess it's another reason for me to learn Javascript even though I'm not too thrilled with it. Quote Link to comment Share on other sites More sharing options...
JT_Allen Posted February 11, 2017 Share Posted February 11, 2017 add Krita to that. I too would be much more excited about Python, not so much for Javascript. I guess it's another reason for me to learn Javascript even though I'm not too thrilled with it. I don't mind learning scripting languages. Javascript tutorials are easy to find. After searching, so is python. Codeschool.com and Codecademy.com are two good resources to learn either. These are what I will use. Quote Link to comment Share on other sites More sharing options...
desult Posted February 11, 2017 Share Posted February 11, 2017 I don't mind learning scripting languages. Javascript tutorials are easy to find. After searching, so is python. Codeschool.com and Codecademy.com are two good resources to learn either. These are what I will use. I was using Codecademy for awhile, but their Python course is using version 2, I don't mind being familiar with the syntax differences, but I would ultimately rather not be learning on an old version. I also like FreeCodeCamp and will probably use both that and Codecademy when I do get around to picking up Javascript. Quote Link to comment Share on other sites More sharing options...
v_kyr Posted February 13, 2017 Share Posted February 13, 2017 From a programmers point of view there is nothing wrong with choosing Javascript, it's widely used and every browser has nowadays a halfway good working JS engine underneath. Also they will be in good company, since all mayor players (MS, Apple, Adobe, Google ...) do use it too in the one or other way. Performance wise JS is also slightly faster than Python. Quote ☛ 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 More sharing options...
harrym Posted February 25, 2017 Share Posted February 25, 2017 Just found this topic :blink: anyway delighted to hear that a scripting language will definitely be implemented in AD/AP. I'm somewhat surprised but happy it will be JavaScript, one less thing to learn! I'd really be able to integrate this into some projects at work (ie a business copy just on that one feature) The big question though.... WHENNNN!!!! Quote Link to comment Share on other sites More sharing options...
anon1 Posted March 4, 2017 Share Posted March 4, 2017 - DanTheColoradan 1 Quote Link to comment Share on other sites More sharing options...
Peter Werner Posted March 25, 2017 Share Posted March 25, 2017 Affinity is mainly written in C++ with the Mac version front-end written in Objective C. Scripting will be Java script as we feel this will cover the largest use cases people want. I just saw this – having done scripting in both languages in different applications, I really, really, really hope this will be reconsidered when the time comes for that feature to be implemented. I'm actually a bit surprised to read that statement since I literally can't think of any use case that JavaScript covers chat Python doesn't, usually even cleaner and easier. Even basic things like splitting code into multiple source files and deriving from classes provided by the host application (say, MenuCommand, UiPanel, or FillerTextGenerator) are maddening and frustrating experiences in JavaScript, if they are possible at all. Imagine use cases like a basic InDesign IDML importer for Affinity Publisher. With an existing Python XML parser package, this is a fairly straightforward task. Or a "Place Article from RSS feed" command. Network access and RSS feed parser come standard with Python without installing anything and would make that type of thing a matter of only a few lines of code. With Adobe-type JavaScript scripting, I'd probably give up the idea of writing that script before even starting. Not to mention you guys would have a much easier time developing and maintaining the C++ host side if you can use boost::python versus some raw JavaScript engine API. Also, JavaScript will likely run scripts in separate engine instances for each script to avoid clashing function names and the like, making it really hard to communicate between different scripts, share code between commands and so on. Even running specific functions defined in a script file from the interactive script console etc. may be impossible. I realize that some folks favor JavaScript because they are already familiar with it, but I don't see how someone who is used to JavaScript wouldn't be able to easily pick up the necessary Python basics within a matter of minutes and be at a point where they could write pretty much everything they could in JavaScript in Python as well. The only real issue I see with Python is that all that power may clash with Apple's AppStore sandboxing rules. Petar Petrenko 1 Quote www.peterwerner.net Link to comment Share on other sites More sharing options...
Moussa Ball Posted May 4, 2017 Share Posted May 4, 2017 Hello everyone, I do not believe that affinity can be written in c++, but rather in c# considering the windows uwp cannot be modified in c++ and that in wpf one can do it or in winform and I believe even they use visual studio with framework .NET if you look at the files well and same the .dll can be referred in c#. I have to even try to take again the same window and I made a success of it. Quote Link to comment Share on other sites More sharing options...
v_kyr Posted May 4, 2017 Share Posted May 4, 2017 Well you can check and find out with "Richprint" and "Detetc it easy". Quote ☛ 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 More sharing options...
anon1 Posted July 8, 2017 Share Posted July 8, 2017 - Quote Link to comment Share on other sites More sharing options...
Moussa Ball Posted July 12, 2017 Share Posted July 12, 2017 Affinity is mainly written in C++ with the Windows version front-end written in C#. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.