[scribus] A few scripter issues
henryhartley at westat.com
Wed Oct 15 17:41:37 CEST 2008
I've rearranged these but earlier today I wrote:
>> * To be sure that none of these items (and particularly the last
>> one) have been fixed/addressed in a more recent snapshot, I just
>> downloaded and installed 1.3.5svn from 10 October 2008. The
>> problem is that now I can't figure out how to run a script at
>> all. I assume (and desperately hope) that this is a temporary
>> situation. Someone please tell me the scripter isn't going away.
>> Or if I'm simply looking right at it but not seeing it, tell me
>> where it went.
OK, I figured out this part. In order to see the scripter in the Scribus menu, you must activate it by going to File -> Preferences, selecting Plugins and checking the "Load It?" box on the Scripter row. Makes sense, I guess, although I would have turned at least a few of them on by default. I'm not particularly exercised either way.
>> * I'm getting an error when I try to run a script from the menu.
>> When I navigate to the file and select it, I get an error that
>> the file cannot be found.
>> Traceback (most recent call last):
>> File "<string>", line 8, in <module>
>> IOError: [Errno 2] No such file or directory: 'C:\temp\Calendar.py'
>> If I then edit prefs135.xml and change the back slashes in that
>> path to forward slashes, I can select the file from the list of
>> recently run scripts and it runs fine.
I still get this error with the scripter. Basically, the file path value returned from the file dialog needs to have backslashes replace with forward slashes. That doesn't sound too hard but then, what do I know?
>> * When I run my script, which takes a few minutes to run, I'd like
>> to switch tasks while its running (i.e. write an e-mail).
>> Unfortunately, when I put the focus on another application, the
>> scripter keeps taking me back to Scribus. If I turn off all
>> status messages and progress indications in my script, it's not
>> quite so bad (it still takes the focus away from what I'm doing
>> although it doesn't actually put focus on Scribus). It still
>> prevents me from doing pretty much anything else. I see this is
>> a reported bug so I'll just say, me too and that it applies to
>> WinXP http://bugs.scribus.net/view.php?id=2948
While this is indeed in the bug tracker, it is listed as resolved. So, perhaps it was resolved in the 1.3.3 tree but it does not appear to have been resolved in the recent 1.3.5svn versions, at least not on WinXP. Can anyone confirm this problem on that (or any other) platform? My guess is that it will NOT be a problem on Linux, meaning when I get home and try it there, I won't have any problems.
>> * I like having the ability to query the user for certain things.
>> It lets me make one script and then decide which of a number of
>> options I want at run time. In addition to the valueDialog() it
>> would be very nice to have a version that presents the user with
>> a list of options from which they can select, rather than asking
>> them to type a string. The messageBox() is nice but it will only
>> allow up to three options (if I read the documentation correctly).
>> If you pass this new selectDialog() a simple array then both the
>> labels presented and the values sent back to the script would be
>> the array values. If an associative array is passed, the keys
>> could become the values passed and the array values the labels.
>> The language selection box from the Scribus installer is a
>> perfect example of what I'm looking for here.
I'll just leave this one alone, as I still think it would be a nice addition to the scripter API.
More information about the scribus