RSS/Atom feed Twitter
Site is read-only, email is disabled

script-fu from the cmdline, arguments not working ...

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

script-fu from the cmdline, arguments not working ... Norbert Preining 02 Apr 09:29
  script-fu from the cmdline, arguments not working ... Irek Slonina 02 Apr 11:09
Norbert Preining
2004-04-02 09:29:33 UTC (almost 20 years ago)

script-fu from the cmdline, arguments not working ...

Hi!

With gimp-2.0 I cannot get gimp script-fu working from the cmdline:

(define (script-fu-fileload txt) (gimp-message "1")
(gimp-message txt)
(gimp-message "2"))

; Finally register our script with script-fu.

(script-fu-register "script-fu-fileload" _"/Script-Fu/Norb/fileload"
"dummy description"
"Norbert Preining"
"Norbert Preining"
"2004.03.17"
""
SF-STRING "Dummy Text" "Hello World")

This simple script DOES work in the GUI (it outputs three windows with "1" "2" and "Hello World").

But on the cmdline: gimp --no-data -i --verbose -b '(script-fu-fileload 0 "foobar")'

does not work.

In fact no combination of (script-fu-fileload 0 "\"foobar\"") (script-fu-fileload 1 "\"foobar\"") (script-fu-fileload 0 "foobar")
(script-fu-fileload 1 "foobar")
works on the cmd line.

The output is always: INIT: gimp_load_config
Parsing '/etc/gimp/2.0/gimprc'
Parsing '/home/norbert/.gimp-2.0/gimprc' INIT: gimp_initialize
INIT: gimp_real_initialize
INIT: gimp_restore
INIT: gimp_real_restore
Starting extension: 'extension_script_fu' script-fu: 1

batch command: experienced an execution error. EXIT: gimp_exit
EXIT: gimp_real_exit
EXIT: batch_exit_after_callback

Thanks a lot for any hints.

Best wishes

Norbert

------------------------------------------------------------------------------- Norbert Preining Technische Universität Wien gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 ------------------------------------------------------------------------------- BURSLEDON
The bluebottle one is too tired to get up and start, but not tired enough to sleep through.
--- Douglas Adams, The Meaning of Liff

Irek Slonina
2004-04-02 11:09:24 UTC (almost 20 years ago)

script-fu from the cmdline, arguments not working ...

On Fri, 2 Apr 2004, Norbert Preining wrote:

Hi!

With gimp-2.0 I cannot get gimp script-fu working from the cmdline:

(define (script-fu-fileload txt)

[..]

But on the cmdline:
gimp --no-data -i --verbose -b '(script-fu-fileload 0 "foobar")'

[..]

Why does you define it with one argument, and invoke it with two arguments?

With invoking it with one argument id does work. You can also give a try with:
(gimp-message-set-handler GIMP-CONSOLE)

[ireks@brightstar srtuf]$ gimp --no-data -i --verbose -b '(script-fu-fileload
"foobar")' '(gimp-quit 1)'
INIT: gimp_load_config
Analizowanie "/etc/gimp/2.0/gimprc"
Analizowanie "/home/users/ireks/.gimp-2.0/gimprc" INIT: gimp_initialize
INIT: gimp_real_initialize
INIT: gimp_restore
INIT: gimp_real_restore
Odpytywanie wtyczki: "/usr/lib/gimp/2.0/plug-ins/gtkcons.py"

(gimp:32474): LibGimpBase-WARNING **: gimp: wire_read(): error Zapisywanie "/home/users/ireks/.gimp-2.0/pluginrc" Uruchamianie rozszerzenia: "extension_script_fu" script-fu: 1

script-fu: foobar

script-fu: 2

batch command: executed successfully. EXIT: gimp_exit
EXIT: gimp_real_exit
EXIT: batch_exit_after_callback
[ireks@brightstar srtuf]$