a script to execute series of commands

Discussion about writing code for Inkscape.
blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

a script to execute series of commands

Postby blurymind » Mon Sep 16, 2013 3:34 am

Hi, I was wondering if there is a tutorial somewhere out there to help me write a scipt (extension) that automates the execution of a series of commands within inkscape.

For example, when colouring with the :tool_paintbucket: -I need to use it multiple times to fill an area properly. And yes, I know I can just hold the shift key :roll: but elaborate on this pls
After I am done I have to manually select a fill object, then do "select same fill color" and then do "path>union"
so If say I wanted to make this a single command and map it to a keyboard shortcut- how do I go about doing that?

And if we have to go even further- if it was a more advanced script, selecting multiple color fills with different colors, then executing select same and then path>union on them per an individual color.
I am guessing that inkscape needs to first get the selected object's fill color code, then select all objects with that same code and merge them (union). However I have no idea how to call these commands. Is there a way to find that out by just using them in inkscape. I wish there was a debug terminal of some sort - where we can see it in action and then use the information.

Macros have been a long requested feature, but to my information nobody has written an implementation so far.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: a script to execute series of commands

Postby hulf2012 » Sun Sep 29, 2013 1:50 am

Hello:
Sorry for this delayed answer. I'm also interested in this capability. Just I don't know how to begin...
Look at here:

http://www.janthor.com/sketches/index.p ... scape.html

http://tavmjong.free.fr/INKSCAPE/MANUAL ... dLine.html

I hope you still looking for the solution

Any feedback is welcome
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.


Return to “Programming”