[scribus] Scripter2: Iteration of pages and setting activePage

Mark Heieis mheieis at alois.ca
Tue Dec 4 17:22:15 UTC 2012


Hello Jain,

See below...

On 2012-11-30 22:45, Jain Basil Aliyas wrote:
> Hello Mark,
>
> Thanks for pointing out!. I've added issue in tracker (http://bugs.scribus.net/view.php?id=11221) and I'm working on adding pages method. Hope to commit it very soon.
Super
> Regards,
> On 01-Dec-2012, at 1:24 AM, Mark Heieis <mheieis at alois.ca> wrote:
>
>> Hi There
>>
>> In Scripter2 (1.5.0.svn), how does one iterate the pages in an activeDocument, ie there doesn't seem to be a page[] list?
>>
>> Alternatively, how does one set/select the activeDocument.activePage from Scripter2, which would solve the above, as activePage.pageCount is available?
I see that in api_page.cpp there is a method "setNumber", which appears 
to be intended as a set active page function. I've tried calling it in 
the console but it fails (eg. 
Scripter.activeDocument.activePage.setNumber(2) of a 4 page doc). 
Perhaps it is not exposed to the interpreter?

In terms of logic, if I have understood the function correctly, it seems 
out of place. To me, setting the activePage at the activeDocument level 
seems to make more sense rather than getting and accessing the current 
activePage and then changing it from this level.
>> For example,  I'd like to do "something" programmatically to each page of the activeDocument based on the page's parameters (eg L or R facing, etc)
>>
>> Thanks
>>
>>
>> ___
>> Scribus Mailing List: scribus at lists.scribus.net
>> Edit your options or unsubscribe:
>> http://lists.scribus.net/mailman/listinfo/scribus
>> See also:
>> http://wiki.scribus.net
>> http://forums.scribus.net
> Jain Basil Aliyas
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.scribus.net/pipermail/scribus/attachments/20121201/388077f1/attachment.html>
> ___
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> http://lists.scribus.net/mailman/listinfo/scribus
> See also:
> http://wiki.scribus.net
> http://forums.scribus.net




More information about the scribus mailing list