Jump to content


  • Content count

  • Joined

  • Last visited

About affi.usr

  • Rank

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

691 profile views
  1. affi.usr


    Why not? https://stackoverflow.com/questions/20306726/right-to-left-text-in-tkinter#43534569 from tkinter import * from tkinter.constants import * root = Tk() text = Text(root,,font=('Tahoma',8))#I need RTL and Right justified text! text.tag_configure('tag-right', justify='right') text.insert('end', 'text ' * 10, 'tag-right') text.grid() scrl = Scrollbar(root, command=text.yview) text.config(yscrollcommand=scrl.set) scrl.grid(row=0, column=1, sticky='ns') root.mainloop() For now on your position I will be write script to reverse text with simple dialog where put text to format. Next when you click proceed you get text in clipboard and then paste them where you want with Ctr+V. For better automation and integration you can add shourtcut to your script and run then. Maybe is not perfect, but it's nothing complicated. You can use AutoIt to handle it or any scripting language which you prefer if only can create GUI. AutoIt: ConsoleWrite(_Revert_text("Reverse this string") & @LF) Func _Revert_text($text) Local $aSS = StringSplit($text, ""), $sTmp For $i = $aSS[0] To 1 Step -1 $sTmp &= $aSS[$i] Next Return $sTmp EndFunc ;==>_Revert_text https://www.autoitscript.com/autoit3/docs/functions/InputBox.htm https://www.autoitscript.com/wiki/InputBox https://www.autoitscript.com/autoit3/docs/functions/ClipPut.htm
  2. affi.usr


    To be more precise. It is example how can you scripted Affinity Publisher today. It is not easy and comfortable solution. First you have to use this aproach to create more user friendly library. AutoIt I put here as temporary solution before full scripting will be implemented. Personaly I prefer Python for short and robust code. I dislike JS as sometimes not clear for me.
  3. affi.usr

    Badly designed fonts

    I have to sadly agree. There are very bad fonts to use it. For polish language is no option, because of missing letters. I hope in the future company repair his mistakes and use more feature proof font. In my project I use language used by about 60 milion people on the Earth, but on English pages I can find free fonts with complete bunch of letters. I can not understand why I can get for free Juan Pablo del Peral award winning font (2010) without troubles described above when I support company which I like for price to value, innovative features by purchuase their product and get low quality gift. It is scandal! For some english only speaking audience maybe it is not problem, by Affinity is translating his product for other languages. It is crucial to get support for other languages as base to work with it.
  4. affi.usr


    Now it is one walk around, but is not very user friendly. For Windows platform you can use AutoIt. Using spy Windows you can get native GUI windows fx. for Affinity Photo: HwndWrapper[Photo.exe;;452e26ab-922c-48d1-ae6b-1160a6b1a0f4] Using AutoIt command you can send clicks and keys to simulate real user active work. The most pain is build that way structure to work with it and next create scripting layer called your first created structure. To show up in practise what I mean by structure I paste below example code from Autoit forum (GIMP automation): Opt("WinTitleMatchMode", 4) While 1 If WinGetHandle("[CLASS:gdkWindowToplevel]") Then _GetHandles() HotKeySet("m", "fractal") Else HotKeySet("m") Sleep(100) EndIf WEnd Func _GetHandles() ;Variables global $WindowHandle = WinGetHandle("Programa de manipulación de imágenes de GNU") ;Get handle of the main GIMP window. global $ToolboxHandle = WinGetHandle("Caja de herramientas") ;Get handle of the GIMP Toolbox. global $WinTitle1 = WinGetTitle($WindowHandle) ;Get title of main GIMP window to test that it is the correct window. global $WinTitle2 = WinGetTitle($ToolboxHandle) ; Get title of GIMP Toolbox to test that it is the correct window. EndFunc ;==>_GetHandles Func fractal() MsgBox(0, "0", $WinTitle1 & " " & $WindowHandle & @CRLF & $WinTitle2 & " " & $ToolboxHandle) ;Present a message box to confirm title and check handle against the Window Info Program ControlFocus($WindowHandle, "", "[CLASS:gdkWindowChild; INSTANCE:2]") ;Focus on the main GIMP window ControlClick($WindowHandle, "", "[CLASS:gdkWindowChild; INSTANCE:17]", "main", 1) ;Click File ControlClick($WindowHandle, "", "[CLASS:gdkWindowChild; INSTANCE:19]", "main", 1) ;Click Open as Layer... EndFunc ;==>fractal
  5. affi.usr


    Automate boring stuff - fx. preparation for specific type of project. When you create the same type layout when you have to change the same details you can use generator for it fx. calendar on current year. Add functionalities / change internal workflow - fx. you want add custom icon execution loading last project based on it's dates fx. you create for the same company baner each month and after few month you mix few baner in one as quartal poster. Adding this funcionality add benefits preparing for job in less time. Extend exist workflow - you can add support for unsupported file format by auto convert source file supported by Affinity Suite. Semicreative - fx. add cloud generator with colors matched from dominant colors on the picture New filters ... You do not have to be a professional programmer. Sometimes you need only clever thought how make stuff working better and googling. In some languages like Python using libraries can make hard problems simplified to few lines of code. It is why important is create working system easy to follow for everyone.
  6. affi.usr


    Yes, definetelly is it a problem. I will be resolve it by inside Affinity Host Controller. If artboard is missing it simply not running function associated with artboard. The simplest for developer is run with error and stop executing with message like "Artboard have to be first created". Other stuffs it is user responsibility. If inside language use conditionals (if-else, for loops etc) it is really doesn't matter if you are developer or not. You will be always has learning curve. Only solution is make abstract syntax with option use them directly with fx. text files with step by step and possibility wrap generate in other language. V_kyr, it is your solution mixed with mine. I stand on possition make possible use any language with internal API. It is not problem create file to internal interpretaror and use another language to create wrapper about it by simple use code fx. inside C++ / Python classes to generate text file output. Typical user will in my opinion prefered run macro recording and only edditing some parts. It is the simplest solution. For generating effect it is the simplest way to achive goals without coding.
  7. affi.usr


    You forgot about learning curve. The most people use the easiest to follow tool for job. It is why InDesign was better that QuarkXPress and the sam is for programming. Who remember now Delphi? Python like syntax is easier for me to follow: doc = AffinityAPI.document() current_artboard = doc.artboard[0] for i in current_artboard: shape = current_artboard[i] doc.set_selection(shape) I will be going with these that people are more interested in making working things than in learning new inside script languages. I think more abstracted API prepared for any language is good shot. Why not use ADA 95 if you like? For very low level Affinity Team have to use compiled language, but for high API I will be use abstract to only creating settings what do. It is how website are created. You do not think how HTML is implemented but how use it. It's way to use Affinity in easy way for every case.
  8. affi.usr


    This is key what I think about. Create scripting with inbuild macro recording it is not new thing. I prefer go ahead competitors and ask about: How make scripting in Publisher and Affinity Suite more problem solving oriented in place learning new path tool? How make it OS idendepented and open for intergration for data providers like servers, e-mails etc. for creating worflow oriented on fitting Affinity Suite with data? How make it user friendly that after 5 minutes reading introduction I can create solution for my typical problems (like automate boring stuff in the easiest way possible) without digging in docs? How use aproach less code more possibilities? After few year experience with coding in Python I can say the best with it is the simplicity. You can code with less code lines and it is minimal with extra ; or {. Dear Peter you should think about possibilities that after Python in the future it can be easier and more powerful language. I like using it, but when I start coding with Turbo Pascal when I found C++ I think that it is the best tool on the Earth. VBA, JS, Assembler 8086, PHP are some of langs which I try before I stay with Python for longer time. For some scenarios Python libraries can make faster results than coding in my earlier favorite C++. I have the same opinion. Afifnity Team use inside Java Script for testing Affinity Suite so they can prefer it as they have some experience with it. Python it the most universal tool now from web developing to data analysis. Future Today a lot of people think about graphics like only creating retushing, vectors or DTP publishing. Now it is changing. Data analysis blured line between interactive programming and showing visualistation in real time for information. I see few niches to go inside and take advantage with creating something really new. Scenario Client need poster with financial statistics for company. Using Python Pandas we can create analysis of data and with bokeh library create visualisation. Now using OpenCV we can recognise elements in PDF for vectorise it without designer interaction in Affinity Designer. After that we need text classification for typical client document so we can use C++ library for Nvidia Tesla to improve sentimental analysis of text and get thinal thought about how people feel about products. Using C++ is dicted by specific of Nvidia card and better for performance reason. With PHP we can grap form SQL database financial data to get view how many cost new product and put this to Affinity Designer to create graph. Using in other place JS (jquery) we can grap from menager data about marketing strategy because he can add photographies of last events to summary template in Publisher. With machine learning photography are selected for quality like sharpness and avoiding two previous emploees with awful public opinion what support company create with R. ... For start it's seems strange and too more complicated why not using e-mail or FTP to sharing data, but now automation is in progress. Creating workflow where computer in real time can add data from few other source to graphic project is very interesting start. As designer you can use infrastructure created by someone else and concentrate how creativly improve visual communication and make your work better. If retoucher work with similar projects like party events photography using templates for drafting can make work easier. Creating base for integrating other tools for working inside Affinity Suite it is not only choose language but make it easier for anyone. If programmer with 20 years old experience in C++ can create solution in place learning for X project python it is big deal. Summary When 70 years old man with basic computer experience will can create script / working solution for his problem because has basic understaing how Affinity Publisher or other apps from Affinity Suite works it will be pass test for simplicity script tool what I suggest here.
  9. affi.usr


    Yes, it is. From other hand it can be simple. Escape using one language by using text file with steps to do: file.new(type=print, colour=[colour_format=rgb/8, colour_profile=sRGB], include_margins=[left=5, right=5, top=5, bottom=5]) file.export(JPEG, Size=(7015px,4960px)) Passing to app with std in (print to console with something like that: printf("file.new...") print('file.new'...) In app is loaded as plugin so app knows that will be receive data. Your script / program only have to be runable. You can use any style of language. Primary syntax is simple - write in style of description of GUI file - menu file new - submenu in file => file.new (options) [tabs / sections] = value or something similar. For low level using you have to write code in style you will be clicking something in GUI. It can be possible add shortcuts from keyboards in something like that: sendkey(Ctrl+J) On this low level API you can create any abstraction for your favorite language. You can pass option directly of make custom Objects style with class Image and passing data to it if you wish. You can add plugins which get data from network if you wish in the same style too. So you can make universal text based API which you can code if you only know bunch of rules how translate actions in menu without getting into abstraction like construction of Affinity Team classed for Affinity Designer. API is implementation of universal caller. You can call inside Affinity app operation by text file, by generating comands in your script or passing to script from network. At the end my final thought is make universal structure for interaction with data without deep into and stuck with one language. With adding special command to create gui inside Affinity apps you have universal tool. User job is only choose his favorite editor (like Notepad) or coding language if he needs something with more interaction (loops, conditionals). Community can build libraries to automate commons task, setting defualt options, share and that is all. Why not one language? Now trending is Python, but after ten years it can be lua, new version of C etc. So why not avoid stucking with lang which can be abandon in the future, because of technical change? If you know Python you can write code in it, but if you good in vbs you can do the same in it.
  10. I made preorder. I hope will be unlocked Photo and Designer persona.
  11. affi.usr


    I can't understand why the most people think about using one language for scripting in place make this independent? Solution 1. Create Affinity Controler App 2. Create API to interact with controller 3. Using GET / POST request with your favorite language to control Affinity Suite without bodering about what language is used. 1) Affinity Controler App - is local webserver. When someone is calling it's function it is start controlling choosen app. 2. API is local adress with choosen port to make calls fx. localhost:2019/ad/open/file&name=test.afdesing localhost:2019/ad/export&format=pdf&preset=print&rasterdpi=300 It is powerful. It need some effort to make inside call in Affinity Suite, not only Publisher, but it is worth. You can share script between platforms in easy way. You can automate workflow using another system too fx. save data from client on Samba server, from Linux call computer with Windows to open and run application to make template filled with photos (fx. Atlas of mushrooms) and after preparation designer will have to work with text. 3. Calling local API for application is simple way to avoid locking possibilities for specific branch of person. I skip ActionScript in Photoshop, because I do not have time to learn it when I need fast work done. I use another software to prepare files as it was simpler and faster when clock ticking... At the end I suggest using seperate application for calling all apps, because in my vision Affinity Suite can send virtually data between fx. create some part in Photo, add in Designer and create final PDF with Publisher.
  12. I would try as you suggest. Thank you for response! I think about edit Pentax K1 profile available in program, but changing format it is easiest way.
  13. Dear Affinity users! I use Capture One and currect versions are not supporting my new camera Pentax K1 II. I want create ICC profile for RAW processing in Capture One with Affinity Photo for this camera. Can any of us get me additional information how start with it and where I can find more technical details about ICC to go Affinity Photo and create my custom one ICC? I found information that profile can be created in any graphic software so as happy Affinity Photo user I want create one. Thank you!
  14. Affinity Team have to learn from bigger players like Adobe. It is how Adobe resolve issue [Official script guide fro 2019 year] Adobe make tree language to use: JavaScript, VBA and AppleScript. I wrote in my post here about REST API. My aproach is more universal and not limited to OS, programming language and platform. Affinity Team can use this aproach to share multisystem graphics to share and access programs fx. in LAN. It is only example. For people who don't know here is video with basic explanation what is REST API. I use Awasu news reader and it is inbuild REST API. Using call via link I can get fx. example Awasu to front of anothers applications, update things and get data. For some automatication using only calls from file user can control Affinity applications in matter: url one url two ... url n fx. localhost:8000/ad/open?file="logo.afdesigner" localhost:8000/ad/draw/rectangle?height=200&width=300&posX=23&posy=100 localhost:8000/ad/export/slices/all On Windows add this tree lines with word 'start' before them in notepad to new file, save as macro_affinitydesigner.cmd and in style: start localhost:8000/ad/open?file="logo.afdesigner" start localhost:8000/ad/draw/rectangle?height=200&width=300&posX=23&posy=100 start localhost:8000/ad/export/slices/all you have working macro. In Affinity you can add this in fx. special "Macro" menu and Affinity application will be run from menu in the same way that you will click on them on desktop. In Photoshop is calling Actions as you can see on this example video. One the way for that is write in seperate windows API call which you can simply copy and paste. Using API you can add extra parameters like dimensions from variables. It is when it start difference. Where is difference? Macro system is based on specific commands / language and it is a Photoshop way. API REST is oriented on client - server. Client is what you use to open link and adjust parameters on them. Server is application with reaction on this fx. browse this forum and check how differences in links switch make post, show another subforum etc. It is the same, but in place showing part of Affinity forum you use menu / command inside Affinity application.
  15. Introduction Typically application to automate stuff use inside script language like AppleScript, JavaScript, and VBScript. It is a limitation to use by user. They have to know language to make script to make things. I think it is better way that can revolutionise way of interact with graphic application. It is a REST API. Why Using API with token to get protect application from overuse by untrusted source is the easiest way to escape from problem which script language use. By calling fx. localhost:8000/menu/file/new/jpg&dimH=200&dimW=200 user can get new file with specified dimension using what is he want - PHP, JS, Python, Java, C++. Of course using JSON or XML application can get detailed information and what and how call it can be resolve on the a lot possibles ways. For example it can be simple mapping all menu option like AutoIt, PyWinauto etc. works by simulated clicking on menu. For not detailed conspect mapping menu to show/hide dialogs, paste values to them, GUI icons, modify palletes etc. It is a the most universal way to work. If you like you can fx. using Android to make batch processing on PC via wifi and it is only beginning. Another Affinity Application gen control another app or fx. using database to populate clients details for project of certificate of authencity. Data from MySQL goes to app using API and via API call you can export file and another programmist can take them to make the flow more powerful than anyone can imagine. Using one language limits user who know it. It is a way around and fx. you can use local webpage with JS script to working with application. Summary Now only exist only webservice to work with graphic in that way. So it is a very interestive alternative to make business more powerfull. Plugins from users and free exchange of his works makes community more engagment and potential user more interested all application suite. I wrote about Affinity Designer, but it is beggining. Using this way to automate all aplication from Affinity Suite will make new industry strandard. It is easy, very well tested idea from concept side. It can get time to implement, but I think it is worth. No one company in graphic business do it. It is the most open solution with closing propetriary code to safe your work from overused. Question to developers Why not do you think about scripting your apps in that way?