Scribus Forums

Scribus => Scripts and Plugins => Topic started by: digirew on September 24, 2020, 08:12:16 pm

Title: Quit Scribus via. Scripter API
Post by: digirew on September 24, 2020, 08:12:16 pm
I would like to run a script via. Scripter API, and then once its done, to also quit Scribus.

Does anyone know if this is possible?
Title: Re: Quit Scribus via. Scripter API
Post by: a.l.e on September 24, 2020, 09:21:39 pm
yes:

http://impagina.org/scribus-scripter-api/dialog/#filequit

if you're starting scribus to run a specific script and then want to quit, there is a command line switch to get scribus to quit once it's done.
Title: Re: Quit Scribus via. Scripter API
Post by: digirew on September 25, 2020, 02:17:57 am
I looked at that api page high and low and did not see it, thanks for pointing it out.

Just tried it and works like a charm.



Title: Re: Quit Scribus via. Scripter API
Post by: a.l.e on September 25, 2020, 11:25:48 am
indeed, it's a bit awkward to have it in the dialogs sections.

we probably need a second version of quit that does not have anything to do with the dialog.

anyway, in the top left corner of the API unofficial documentation there is a search field: i simply typed quit in there and got two matches. one of both was the right one : - )
yes, i'm a lazy guy.
Title: Re: Quit Scribus via. Scripter API
Post by: dragonfly on September 25, 2020, 08:57:07 pm
At the end of the script you could run a command through subprocess to kill Scribus process.
Or invoke Ctrl+Q hotkeys.