Gimp-Forum.net
Hack the code to run a script-fu plug-in on start-up - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Gimp 2.99 & Gimp 3.0 (https://www.gimp-forum.net/Forum-Gimp-2-99-Gimp-3-0)
+--- Thread: Hack the code to run a script-fu plug-in on start-up (/Thread-Hack-the-code-to-run-a-script-fu-plug-in-on-start-up)



Hack the code to run a script-fu plug-in on start-up - pixelmixer - 08-23-2023

I'd love to run an autosave script-fu plug-in on start-up, is it even possible to call a script-fu plug-in from a C function?


RE: Hack the code to run a script-fu plug-in on start-up - Ofnuts - 08-23-2023

(08-23-2023, 09:37 PM)pixelmixer Wrote: I'd love to run an autosave script-fu plug-in on start-up, is it even possible to call a script-fu plug-in from a C function?

Script-fu probabky not because AFAIK there is only one script-fu engine, so if you run a script-fu permanently no other script-fu can run.

There is a way to have a random executable run on startup (*) but this executable has to return otherwise the startup sequence ill hang.

(*) Gimp runs everything that looks like a plugin executable on startup, unless it finds that is has registration data for that executable which is more recent than the executable. So if the executable never registers, it is run on every startup


RE: Hack the code to run a script-fu plug-in on start-up - pixelmixer - 08-24-2023

(08-23-2023, 10:54 PM)Ofnuts Wrote:
(08-23-2023, 09:37 PM)pixelmixer Wrote: I'd love to run an autosave script-fu plug-in on start-up, is it even possible to call a script-fu plug-in from a C function?

Script-fu probabky not because AFAIK there is only one script-fu engine, so if you run a script-fu permanently no other script-fu can run.

There is a way to have a random executable run on startup (*) but this executable has to return otherwise the startup sequence ill hang.

(*) Gimp runs everything that looks like a plugin executable on startup, unless it finds that is has registration data for that executable which is more recent than the executable. So if the executable never registers, it is run on every startup


Quote:there is only one script-fu engine, so if you run a script-fu permanently no other script-fu can run

Thankfully, this is not the case in 2.99, I just keep forgetting to start the auto-save.


RE: Hack the code to run a script-fu plug-in on start-up - pixelmixer - 08-24-2023

halfway there, swaps the techno message for a reminder
gimpdisplayshell-callbacks.c
   msg = g_strdup_printf ("<big>Start Autosave</big>");