The original version of this page can be found at : http://forum.makemusic.com/default.aspx?f=12&m=277964
Posted By : meneeermalik - 12/7/2009 11:32 AM
Hi again,
Is there a script or is it possible to write a script that would process all .mus files in a folder and remove all headers and footers? I have a date footer and another footer with the original name of the file that I'd like to remove.

Thanks.

Posted By : rbeavers - 12/7/2009 9:57 PM

I don't know about processing all .mus files in a folder, but this is what I use to select and delete all text blocks upon opening a document (I'm assuming your header/footer was created with the Text Tool):

// clear text

Text tool

press control + "A"

delete key

 


MM Composition, UT Austin
Finale 2009c
Windows Vista


Posted By : meneeermalik - 12/7/2009 10:10 PM
wow that's perfect, thanks!! It's a good start. Is there a way to keep the title? Or an additional script to insert a title name?

Posted By : rbeavers - 12/8/2009 11:55 AM
I'm sure there are ways to do both those things, but I don't know personally.  You may want to search this forum a few weeks back...seems like someone was trying to figure out how to select/manipulate specific text blocks.


MM Composition, UT Austin
Finale 2009c
Windows Vista


Posted By : UCG Musician - 12/9/2009 7:39 PM

Based on the technique rbeavers provided, you can select all text blocks but not some.  However, you can use FS to enter a text box and position it where you wish.  This includes specifying the font and other frame attributes.  The following script gives an example:

Text tool

double click

press "z"

press "z"

press "z"

 

Menu item "Text/Frame Attributes..."

Dropdown "Single Page" near "Page"

Dropdown "Left" near "Horizontal:"

Type 0 near "H:"

Dropdown "Top (Header)" near "Position From:"

Type -0.5 near "V:"

Dropdown "Page margin" near "Position From:"

Check "Position from edge of frame"

UnCheck "Use right page positioning"

Hit OK

Search "zzz" Replace "Instrument" [Palatino Linotype] 15 italic bold

 

This puts a text box containing "zzz" wherever your cursor is at initially but then positions it in the next set of instructions.  Next "zzz" is replaced by "Instrument" in the specified font.  You could do this with a title easily enough with the necessary adaptation.

 

Randy


Posted By : meneeermalik - 12/9/2009 8:34 PM
Thanks that helped. It works for most but I tend to have spacing issues afterwards with some songs. You mentioned that based on the previous technique, there's a way to select all of the text but not some. Do you know the command or what to do for that. I've been trying to get a script for that but it's just not working.

Thanks.

Posted By : UCG Musician - 12/9/2009 9:30 PM
I am referring to what rbeavers suggested to delete all text boxes:
 

Text tool

press control + "A"

delete key
 
You said you tried it & it worked for you.  If you want to delete all the text within a text box (but presumably keep the text box for some reason) I'm not sure that can be done.
 
Your spacing issues may exist if you did not adapt the script I provided with the correct positioning for your circumstances.  My example puts a new text box containing "Instrument" on the left side of a document .5 inches below the top margin.  A title would be centered so you have to change the parameters in the frame attributes dialog box accordingly.
 
Randy

Posted By : meneeermalik - 12/9/2009 10:11 PM
Hi Randy,

I guess what I meant is that I want to delete all the text boxes/blocks in a document except for the title text box. I know that if you do control + A and then hold the shift while left clicking on the Title box it unselects the title box. If you hit delete after that all the text boxes are deleted except for the Title box. One of the things I'm looking into is trying to get a script to select/unselect a text box.

Posted By : UCG Musician - 12/9/2009 11:03 PM
FS cannot delete all but one text box & it can't single out any specific text box. If you tried the code to delete all text boxes & it worked for you then combine that code with the one I gave you to create a new text box for the title & you should have your solution.

Posted By : meneeermalik - 12/10/2009 12:25 AM
Thanks. I had a similar script. This one is much cleaner and accurate. I had a few problems with mine and so I was trying to find a different way. Thanks for all the help.