[scribus] Scripter and Preferences
gregp_ky at yahoo.com
Wed Nov 24 04:44:27 CET 2010
On 11/23/2010 06:22 PM, Olivier BERTEN wrote:
> If it's that trivial, then there's no point in having that preference at
> Since extension scripts are supposed to work inside the application, it
> seems rather obvious to me they need to take in account the preferences
> that lead all other parts of the application... Or maybe I just didn't
> get the point...
I don't know, maybe you don't.
If you look at various generic scripts, several will begin with an
existing document, record the units, switch to whatever units are needed
for the various dimensions of the script and then at the end switch back
to the original units.
So make a one-page doc with your units, then run a script using haveDoc,
etc, switching units as needed, make more pages as needed, then switch
units back if needed.
Plan B: make the doc with some arbitrary units, then either let the user
switch units after the script runs, or give them a dialog to choose and
switch for them.
In the end, you may wish that this item of the preferences was
accessible, but it's not. If that is some sort of show-stopper or upsets
you a great deal, we're sorry.
More information about the scribus