Author Topic: Quit Scribus via. Scripter API  (Read 157 times)

digirew

  • Newbie
  • *
  • Posts: 36
  • Karma: 0
  • Scribus User
Quit Scribus via. Scripter API
« 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?

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2440
  • Karma: 35
    • the graphics lab
Re: Quit Scribus via. Scripter API
« Reply #1 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.

digirew

  • Newbie
  • *
  • Posts: 36
  • Karma: 0
  • Scribus User
Re: Quit Scribus via. Scripter API
« Reply #2 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.




a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2440
  • Karma: 35
    • the graphics lab
Re: Quit Scribus via. Scripter API
« Reply #3 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.

dragonfly

  • Full Member
  • ***
  • Posts: 174
  • Karma: 0
  • Scribus User
Re: Quit Scribus via. Scripter API
« Reply #4 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.