All pastes #950561 Raw Edit

dialpad_script.scm

public text v1 · immutable
·published 2008-03-20 17:46 UTC
rendered paste body
(define (touch-dialpad-port-function image drawable)
   (let* ((newImg)
          (layers (gimp-image-get-layers image))
          (num-layers (car layers))
          (layer-array (cadr layers)))
     
     (gimp-layer-set-visible (aref layer-array 24) TRUE)
     (gimp-layer-set-visible (aref layer-array 25) TRUE)
     (gimp-layer-set-visible (aref layer-array 26) FALSE)
     (gimp-layer-set-visible (aref layer-array 27) TRUE)
     (gimp-layer-set-visible (aref layer-array 28) TRUE)
     (gimp-layer-set-visible (aref layer-array 44) FALSE)
     (gimp-layer-set-visible (aref layer-array 45) FALSE)
     (gimp-layer-set-visible (aref layer-array 46) FALSE)
     (gimp-layer-set-visible (aref layer-array 47) FALSE)
     (gimp-layer-set-visible (aref layer-array 48) FALSE)
     (gimp-layer-set-visible (aref layer-array 49) FALSE)
    
     (gimp-selection-layer-alpha (aref layer-array 19))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/indialer_ps.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/indialer_ps.png")
     
     (gimp-selection-layer-alpha (aref layer-array 30))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EraseBtnup_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EraseBtnup_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 31))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/ClogBtnup_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/ClogBtnup_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 32))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/StarBtnup_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/StarBtnup_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 33))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/PoundBtnup_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/PoundBtnup_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 34))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn9up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn9up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 35))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn8up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn8up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 36))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn7up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn7up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 37))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn6up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn6up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 38))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn5up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn5up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 39))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn4up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn4up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 40))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn3up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn3up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 41))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn2up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn2up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 42))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn1up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn1up_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 43))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn0up_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn0up_Port.png")
                             
     (gimp-layer-set-visible (aref layer-array 26) TRUE)
     
     (gimp-selection-layer-alpha (aref layer-array 30))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EraseBtndn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EraseBtndn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 31))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/ClogBtndn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/ClogBtndn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 32))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/StarBtndn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/StarBtndn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 33))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/PoundBtndn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/PoundBtndn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 34))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn9dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn9dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 35))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn8dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn8dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 36))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn7dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn7dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 37))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn6dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn6dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 38))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn5dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn5dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 39))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn4dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn4dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 40))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn3dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn3dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 41))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn2dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn2dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 42))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn1dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn1dn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 43))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn0dn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn0dn_Port.png")
                             
     (gimp-layer-set-visible (aref layer-array 24) FALSE)
     (gimp-layer-set-visible (aref layer-array 25) FALSE)
     (gimp-layer-set-visible (aref layer-array 26) FALSE)
     (gimp-layer-set-visible (aref layer-array 27) FALSE)

     (gimp-selection-layer-alpha (aref layer-array (- num-layers 1)))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/Dialer_BkgdP.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/Dialer_BkgdP.png")
                             
     (gimp-layer-set-visible (aref layer-array 28) FALSE)
     (gimp-layer-set-visible (aref layer-array 44) TRUE)
     (gimp-layer-set-visible (aref layer-array 45) TRUE)
     (gimp-layer-set-visible (aref layer-array 46) TRUE)
     (gimp-layer-set-visible (aref layer-array 47) TRUE)
     
     (gimp-selection-layer-alpha (aref layer-array (- num-layers 1)))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/Progress_BkgdP.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/Progress_BkgdP.png")

     (gimp-layer-set-visible (aref layer-array 48) TRUE)
     (gimp-layer-set-visible (aref layer-array 49) TRUE)
     
     (gimp-selection-layer-alpha (aref layer-array 51))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EdBtnDn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EdBtnDn_Port.png")
     
     (gimp-selection-layer-alpha (aref layer-array 50))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/CmdBtnDn_Port.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/CmdBtnDn_Port.png")
   )
)

(script-fu-register "touch-dialpad-port-function"
        _"<Toolbox>/Xtns/My Stuff/dialpad-port..."
        "slice a dialpad portrate image into parts"
        "Philip Dean"
        "Copyright 2008 Philip Dean"
        "Feb. 23 2008"
        ""
        SF-IMAGE    "image"     0 
        SF-DRAWABLE "drawable"  0
        )




(define (touch-dialpad-land-function image drawable)
   (let* ((newImg)
          (layers (gimp-image-get-layers image))
          (num-layers (car layers))
          (layer-array (cadr layers)))
     
     (gimp-layer-set-visible (aref layer-array 24) TRUE)
     (gimp-layer-set-visible (aref layer-array 25) TRUE)
     (gimp-layer-set-visible (aref layer-array 26) FALSE)
     (gimp-layer-set-visible (aref layer-array 27) TRUE)
     (gimp-layer-set-visible (aref layer-array 28) TRUE)
     (gimp-layer-set-visible (aref layer-array 44) FALSE)
     (gimp-layer-set-visible (aref layer-array 45) FALSE)
     (gimp-layer-set-visible (aref layer-array 46) FALSE)
     (gimp-layer-set-visible (aref layer-array 47) FALSE)
     (gimp-layer-set-visible (aref layer-array 48) FALSE)
     (gimp-layer-set-visible (aref layer-array 49) FALSE)
    
     (gimp-selection-layer-alpha (aref layer-array 19))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/indialer_ls.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/indialer_ls.png")
     
     (gimp-selection-layer-alpha (aref layer-array 30))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EraseBtnup_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EraseBtnup_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 31))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/ClogBtnup_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/ClogBtnup_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 32))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/StarBtnup_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/StarBtnup_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 33))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/PoundBtnup_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/PoundBtnup_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 34))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn9up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn9up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 35))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn8up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn8up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 36))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn7up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn7up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 37))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn6up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn6up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 38))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn5up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn5up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 39))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn4up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn4up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 40))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn3up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn3up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 41))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn2up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn2up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 42))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn1up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn1up_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 43))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn0up_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn0up_Land.png")
                             
     (gimp-layer-set-visible (aref layer-array 26) TRUE)
     
     (gimp-selection-layer-alpha (aref layer-array 30))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EraseBtndn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EraseBtndn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 31))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/ClogBtndn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/ClogBtndn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 32))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/StarBtndn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/StarBtndn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 33))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/PoundBtndn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/PoundBtndn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 34))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn9dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn9dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 35))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn8dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn8dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 36))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn7dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn7dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 37))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn6dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn6dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 38))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn5dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn5dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 39))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn4dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn4dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 40))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn3dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn3dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 41))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn2dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn2dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 42))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn1dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn1dn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 43))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn0dn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/NmBtn0dn_Land.png")
                             
     (gimp-layer-set-visible (aref layer-array 24) FALSE)
     (gimp-layer-set-visible (aref layer-array 25) FALSE)
     (gimp-layer-set-visible (aref layer-array 26) FALSE)
     (gimp-layer-set-visible (aref layer-array 27) FALSE)

     (gimp-selection-layer-alpha (aref layer-array (- num-layers 1)))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/Dialer_BkgdL.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/Dialer_BkgdL.png")
                             
     (gimp-layer-set-visible (aref layer-array 28) FALSE)
     (gimp-layer-set-visible (aref layer-array 44) TRUE)
     (gimp-layer-set-visible (aref layer-array 45) TRUE)
     (gimp-layer-set-visible (aref layer-array 46) TRUE)
     (gimp-layer-set-visible (aref layer-array 47) TRUE)
     
     (gimp-selection-layer-alpha (aref layer-array (- num-layers 1)))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/Progress_BkgdL.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/Progress_BkgdL.png")

     (gimp-layer-set-visible (aref layer-array 48) TRUE)
     (gimp-layer-set-visible (aref layer-array 49) TRUE)
     
     (gimp-selection-layer-alpha (aref layer-array 51))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EdBtnDn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/EdBtnDn_Land.png")
     
     (gimp-selection-layer-alpha (aref layer-array 50))
     (gimp-edit-copy-visible image)
     (set! newImg (car (gimp-edit-paste-as-new)))
     (file-png-save-defaults RUN-NONINTERACTIVE 
                             newImg 
                             (car (gimp-image-flatten newImg)) 
                             "/files/Graphics/WM_Themes/dialpad/tmp/CmdBtnDn_Land.png" 
                             "/files/Graphics/WM_Themes/dialpad/tmp/CmdBtnDn_Land.png")
   )
)

(script-fu-register "touch-dialpad-land-function"
        _"<Toolbox>/Xtns/My Stuff/dialpad-land..."
        "slice a dialpad landscape image into parts"
        "Philip Dean"
        "Copyright 2008 Philip Dean"
        "Feb. 24 2008"
        ""
        SF-IMAGE    "image"     0 
        SF-DRAWABLE "drawable"  0
        )