Attach Script to Context Sensitive Menu?

Previous topic - Next topic

Derek

I'm new to Python (and scripting for Scribus) so at the start of a couple of learning curves.

I'd like to write a script which can be used to flag workflow in the document I'm editing (a monthly magazine with a lot of tracking to do between editions). The basic script would:

1) Save the current layer
2) Switch to the "Workflow" layer
3) Add a text frame containing "OLD", "KEEP", "QUERY", "WIP", or "NEW" in appropriate colours/fonts/rotation at the cursor position (hence wanting to run the script from the context sensitive menu)
4) Switch back to the saved (current) layer.

I'm currently doing this manually. I'd like to speed up the process a little.

a.l.e

not possible for now, sorry

a different approach (which might even be faster): you could try to find out if pyqt allows you to capture the clicks... and have a script that captures four clicks and adds the frames there...

you will probably need to "enable extension scripts" in the preferences to have a chance to get it to work..

Derek

Thanks. I'll take it slowly for the moment.

I now have a series of scripts (one for each stage) which speed things up a bit. There's room for improvement which I'll look at later as my knowledge grows.

As it's my first* Scribus / Python script, it's very straightforward, and could do with some tidying up I'll not post it here, yet. Hopefully I'll get back to it before I completely forget what on Earth I was thinking. If/when I do tidy/improve it I'll post it here.

* I didn't even write a 'Hello World!'