LilleG Posted January 18, 2017 Share Posted January 18, 2017 I’m trying to record a macro that will resize the canvas from the center by adding a specified amount on each side. Started Recording:Used my shortcut for Resize CanvasClicked on Center for the AnchorClicked on the Lock to open itClicked in the right side of the width box and entered +1.5Clicked in the right side of the height box and entered +1.5Clicked on ResizeStopped Recording:Saved to Library And when I click on it in the Library, nothing happens. What am I doing wrong? What am I not understanding about the process? Quote Link to comment Share on other sites More sharing options...
Staff Lee D Posted January 18, 2017 Staff Share Posted January 18, 2017 Hi LilleG, It's working as expected as the Macro is remembering the size of the canvas after adding 1.5 to the width & height. So if you was to then start a new document with a different size and run the saved macro it will resize to the same size as the original one used to record the macro. As macros continue to be developed, more new features will be added over time. Quote Link to comment Share on other sites More sharing options...
LilleG Posted January 18, 2017 Author Share Posted January 18, 2017 Hmmm, what I really expected was for the macro to remember the process, not the result. I don't really want to repeat the exact result; I want to repeat the process in order to continue to expand the canvas as I add multiple borders. jer 1 Quote Link to comment Share on other sites More sharing options...
jer Posted January 18, 2017 Share Posted January 18, 2017 Hmmm, what I really expected was for the macro to remember the process, not the result. I don't really want to repeat the exact result; I want to repeat the process in order to continue to expand the canvas as I add multiple borders. Ah, LilleG, you've come up with another weird one! You are the master-ess of wanting to do really logical functions, only to find out that illogical was the design key! :lol: :lol: Why in the world would you ever think that a macro should be usable for various documents? :lol: :lol: Like you, if I wanted a canvas to always be resized to, say, 800 x 800, I would tell the macro to do that. I wouldn't tell it to add 1.5 to each side! Of course, as a Yank, I guess I just don't have the same thought-patterns as those on the east side of the Atlantic. :lol: :lol: LilleG 1 Quote ♥ WIN 10 AD & AP ♥ Lenovo Legion Y520 15.6" Laptop Link to comment Share on other sites More sharing options...
R C-R Posted January 18, 2017 Share Posted January 18, 2017 Clicked in the right side of the width box and entered +1.5 Clicked in the right side of the height box and entered +1.5 As you may have noticed, when you entered those values, the resulting expressions were converted to numbers before you clicked on Resize. (If not, try it without recording a macro, & tab back & forth between the two fields before clicking on Resize.) So that is what the macro recorded: the numbers, not the expression. For this to do what you want, Resize Canvas would have to retain the expressions instead of converting them to numeric values. Since it does not, the logic is sound, even though it is not what you want or expected. Quote All 3 1.10.8, & all 3 V23.0 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 Affinity Photo 1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
LilleG Posted January 18, 2017 Author Share Posted January 18, 2017 Is there any way to have it retain the expression then? Or should I just forget about Macros being useful in this context? Surely there is a way to record a Macro to do away with a scut-work process that I repeat with every photo I finish. What am I overlooking? Quote Link to comment Share on other sites More sharing options...
R C-R Posted January 18, 2017 Share Posted January 18, 2017 I don't know of any way to prevent any of the fields that accept expressions from converting them to numbers before they are applied to the work. I am fairly sure this would require substantial changes to the code, including some way of retaining the expression in some kind of document unit independent format (so if the document units were changed from say pixels to centimeters the expression would still have the same meaning & work the same way in a macro). This in turn would almost certainly require yet another change in the file format, somewhat like the changes that made the 1.4.x file format incompatible with the 1.5.x one. Currently, the macro function is just a very basic recorder. It does not in itself support logical or computational operations like evaluating expressions or conditionals, or variables, or anything else that a full featured macro programming language could do. That may come later but it is not a trivial task to add that to the app. Quote All 3 1.10.8, & all 3 V23.0 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 Affinity Photo 1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
LilleG Posted January 18, 2017 Author Share Posted January 18, 2017 Okay then. I won't waste any more time trying to make it do something it wasn't designed for. Thanks for the explanation. Quote Link to comment Share on other sites More sharing options...
LilleG Posted January 26, 2017 Author Share Posted January 26, 2017 I would be happy if I could create a Macro that would just let me activate Resize Canvas, set the Anchor (center), set the format? (inches) and open the lock. But once Resize Canvas is active, I can no longer access the Macro function to stop recording. Oh well, maybe we will eventually have "sticky settings" for all user options and that will no longer be needed. Quote Link to comment Share on other sites More sharing options...
pknew Posted September 21, 2018 Share Posted September 21, 2018 On 1/18/2017 at 11:21 PM, R C-R said: I don't know of any way to prevent any of the fields that accept expressions from converting them to numbers before they are applied to the work. I am fairly sure this would require substantial changes to the code, including some way of retaining the expression in some kind of document unit independent format (so if the document units were changed from say pixels to centimeters the expression would still have the same meaning & work the same way in a macro). This in turn would almost certainly require yet another change in the file format, somewhat like the changes that made the 1.4.x file format incompatible with the 1.5.x one. Currently, the macro function is just a very basic recorder. It does not in itself support logical or computational operations like evaluating expressions or conditionals, or variables, or anything else that a full featured macro programming language could do. That may come later but it is not a trivial task to add that to the app. Hi, System engineers have solved the problem since it works for resizing the document, where you have to enter + = 20 for example to increase the current size by 20 pixels. And so we can make a macro usable for any size of document. So why does not it work in the case of canvas? Best regards Pk Quote Link to comment Share on other sites More sharing options...
cleay Posted August 16, 2022 Share Posted August 16, 2022 This bug still exists in 2022(?!) — when recording a macro and resizing, unless both X and Y fields are set expressly, the proportion based on the single X or Y value entered should be recorded, not simply the calculated end values. Quote Link to comment Share on other sites More sharing options...
John Rostron Posted August 17, 2022 Share Posted August 17, 2022 12 hours ago, cleay said: proportion based on the single X or Y value entered should be recorded, I think what you really mean is that the macro should record the Expression entered in the size boxes rather than the final, calculated result. I do agree that this would be a highly desireable property of Affinity macros. John Quote Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630 Link to comment Share on other sites More sharing options...
cleay Posted August 17, 2022 Share Posted August 17, 2022 Yep correct. FWIW, after a LOT of trial and error I managed to work around this by splitting the macro and exporting twice. The first export with a height (but no width) entered in the 'New Batch Job' window, then running the second on the resulting images. 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.