[scribus] Shifting page objects by script - new version

JLuc jluc at no-log.org
Sat Oct 13 21:21:12 UTC 2012


Le 12/10/2012 18:59, Gregory Pittman a écrit :
> New version on the wiki will allow you to enter a series of pages to perform the shift on.
> For example, when the dialog comes up for the pages, you might enter
> 3 5 7 9 11
> to shift the content on those specific pages. The script will give you the default value for the current page, but you
> can make the list anything you want.

Hello Greg,
Thanks for this nice pedagogical documentation work.
The 3 scripts, from the easy to the sophisticated and secure one, are a nice introduction for me in scribus python 
scripting.

AMOF when trying the script i had an error : SyntaxError: EOL while scanning string literal
So i had to edit the script to have the strings written on only one line on line instead of 2 :

shiftdir = scribus.valueDialog('Direction to shift?','Which direction to shift...\n Any change from default shifts to 
Right','Left')

scribus.messageBox('OOPS!',str(pgerr)+' of the pages you entered was\n outside the range of the document\n and therefore 
ignored.',scribus.ICON_WARNING, scribus.BUTTON_OK)

and

scribus.messageBox('OOPS!',str(pgerr)+' of the pages you entered were\n outside the range of the document\n and 
therefore ignored.',scribus.ICON_WARNING, scribus.BUTTON_OK)

I'm surprised i got that python error and not you ?
I think it should be corrected on the wiki.
Do you confirm ?

JLuc




More information about the scribus mailing list