Trigger a script depending on time? - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Trigger a script depending on time? (/Thread-Trigger-a-script-depending-on-time) |
Trigger a script depending on time? - PNGer - 09-14-2017 Hi all, I want to write a Python script that performs a set of GIMP procedures depending on the time elapsed after starting GIMP and was wondering if this kind of script is possible. Thanks in advance. RE: Trigger a script depending on time? - Ofnuts - 09-14-2017 (09-14-2017, 11:33 AM)PNGer Wrote: Hi all, The best you can do is call Gimp with a special parameter: For instance: this script periodically reports the number of opened images: Code: #!/usr/bin/python Then you start Gimp as (assuming it is in a file named "wait.py"): Linux/OSX version: Code: gimp --batch-interpreter python-fu-eval -b 'import sys; sys.path=["."]+sys.path;import wait;wait.run()' Windows version: Code: gimp --batch-interpreter python-fu-eval -b "import sys; sys.path=['.']+sys.path;import wait;wait.run()" |