;;;PrintAccompanistsScore
(let ((saved (d-GetSaved)) (count (d-GetUserInput (_ "Print Accompanist's Score") (_ "How many staffs to make small?") "1")))
  (if (and count (string->number count))
      (let ((staffscript ""))
        (set! count (string->number count))
        (let loop ((number 1))
              (set! staffscript (string-append staffscript "(d-GoToPosition #f " (number->string number) " 1 1) (d-SmallerStaff)"))
              (if (< number count)
                  (loop (1+ number))))       
              
        (let ((name (string-append (_ "Accompanist with ") (number->string count) (_ " cue part") )))      
                (d-DeleteLayout name)  
                (d-SelectDefaultLayout) 
                (ForAllMovements staffscript) 
                (d-SetPendingLayout name)
                (d-RefreshLilyPond)
                (d-CreateLayout name)
                 (d-SetPendingLayout #f)
                (d-SelectDefaultLayout)
                (ForAllMovements staffscript)
                (d-WarningDialog (string-append (_ "Use Typeset->") name (_ " in the Print View to typeset your new layout"))))
        (d-SetSaved #f))))