Hello, I wonder if someone could help me with this problem I'm having using the 'system' command in a scheme file.
[code] ; launch system call to copy image to our www directory on ldad (set! command (string-append "/usr/bin/scp " SRCFilename " " RemoteImageDir)) (system command) ; Close out the image (gimp-display-delete Image) (delete-file SRCFilename) [/code] The first system call gives this error: [error] Error while executing (script-fu-Send-to-Web 1 "web-image.png") ERROR: unbound variable (errobj system) [/error] The 'delete-file' call gives this error: [error] Error while executing (script-fu-Send-to-Web 1 "web-image.png") ERROR: unbound variable (errobj delete-file) [/error] Below is the complete bit of code: [code] (define RemoteImageDir "ls1:/home/tony/testdir/") (define (script-fu-Send-to-Web Image Filename) ; the directory our file will be saved in (set! SRCFilename (string-append "/tmp/" Filename)) ; scale the image to our optimum web size (set! width (car (gimp-image-width Image))) (set! height (car (gimp-image-height Image))) (if (> width 470) (begin (set! newHeight (/ (* 470 height) width)) (gimp-image-scale Image 470 newHeight) (gimp-displays-flush) ) ) ; add a drop shadow (set! drawable (car (gimp-image-get-active-drawable Image))) (script-fu-drop-shadow Image drawable 8.0 8.0 15.0 '(0 0 0) 80.0 TRUE) (gimp-displays-flush) ; save as png file to local drive (gimp-image-merge-visible-layers Image 0) (gimp-displays-flush) (set! drawable (car (gimp-image-get-active-drawable Image))) (file-png-save2 RUN-NONINTERACTIVE Image drawable SRCFilename Filename 1 9 0 0 0 1 1 0 0) (gimp-displays-flush) ; launch system call to copy image to our www directory on ldad (set! command (string-append "/usr/bin/scp " SRCFilename " " RemoteImageDir)) (system command) ; Close out the image (gimp-display-delete Image) (delete-file SRCFilename) ; Let user know it's online (gimp-message "Cool! Your picture is online. You may now include it in a 'Top News of the Day' article.") ) ; Register the function with the GIMP: (script-fu-register "script-fu-Send-to-Web" "<Toolbox>/NWS/Send To Web" "Scales the image to 500px width and saves it to www images rsync directory on LDAD." "Tony Freeman" "2007, National Weather Service" "March 06, 2007" "RGB* GRAY*" SF-IMAGE "The Image" 0 SF-STRING "File Name" "web-image.png" ) [/code] Any help would be appreciated. -- Tony _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user