 |
|
| MakeMusic Forum > Public Forums > FinaleScript > Identifying Text Blocks | Forum Quick Jump
|
|  UCG Musician Registered Member
        Date Joined Aug 2004 Total Posts : 161 | Posted 5/20/2009 2:06 PM (GMT -5) |   | | I'm seeing a lot of activity by new FS users. That's great. I've been a heavy user myself for years. But, as with most who try to understand it, I am frustrated at what it can & cannot do & why some things require extra commands to work at all.
That being said, perhaps some of the newer FS geniuses (or is it genii?) can figure out how FS can "find" an existing text box & do something to it (reposition it, change the text, etc.). I am on a massive project that takes existing files of hymns in piano notation & separates the SATB lines out for arrangement into 14 different instruments or groups of instruments. There are 190 hymns & the project will involve 3,000 files to complete.
I have already scripted much of the work to create 4 lines & arrange the flute & clarinet parts but some things still must be done manually. For example, the original file has no text box in it to identify the instrument. At the beginning of the process I enter a mini text box with "zzz" in it & then use code to search & replace it with the instrument name (like Hans did with his copyright example).
Ideally I'd use FS to create a brand new text box. Nothing I have tried works. So instead I create one as noted above. But the position changes for different instruments. The flute part (using SAT lines only) is transposed up an octave so the music itself lies slightly lower on the page & the text box must be adjusted accordingly. The clarinet part (also using SAT lines only) is transposed up a major second so the music falls slightly higher on the page. Other instruments will use only AT or TB lines & have various transpositions.
There is far more complication to the process that I won't explain in detail but, briefly, text boxes are manipulated, fonts are changed, page sizes are changed, pages are resized, staves are added, staff names are created & positioned and page & system margins are reset.
Can anyone identify a practical way to have FS do the following:
1.) Create a new text box & enter something into it
2.) Find an existing text box & select it for adjustment
3.) Select a group bracket style
Thanks for your help. If workable scripts are found for these I may throw out a few more in the future.
Randy
(UCG Musician) | | Back to Top | |
  |  UCG Musician Registered Member
        Date Joined Aug 2004 Total Posts : 161 | Posted 5/21/2009 10:12 AM (GMT -5) |   | | |
     |  UCG Musician Registered Member
        Date Joined Aug 2004 Total Posts : 161 | Posted 9/17/2009 10:21 PM (GMT -5) |   | RP,
Someone figured out a way to do part of #1 & I experimented with various things that have gotten me 90% of the way there. The following gets me a new text box & lets me position it:
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
(The reason for "zzz" instead of just "Instrument" to begin with is that in lyrics or some text boxes the word "Instrument" occasionally occurs. "zzz" never does, of course, so it provide a way to create a text box containing "Instrument". In subsequent scripts I search "Instrument & replace it with "Flute/Piccolo", "Bb Clarinet", etc.)
This script typically works and I have a similar one that puts the text box in a different position. These scripts work for hymns that are on the left OR the right side of a page. The trouble occurs in scripts that attempt to position the text box in different places on the two pages of hymns that have both a left & right side. If you have an idea as to why it would not work in such cases, please let me know.
I will follow up on the other questions in separate responses so this one doesn't get so long!
Randy | | Back to Top | |
    |  James L Registered Member
        Date Joined Oct 2009 Total Posts : 30 | Posted 10/30/2009 4:23 AM (GMT -5) |   | I'm stumped with 2 and 3 , but I've been working on a couple of 1s.
I made a script that adds part names to the page, but my script only added the names to the top left of each page. I've modified the script to allow for the text block to appear on alternating sides of the page (left & right) and incorporated the 'zzz' and 'instrument' text item idea that Randy demonstrated.
Here's my script. I know it looks a little unwieldy (and this is my short version!):
text tool menu item "Page View" // menu item "view/zoom/other..." type "300" button "ok" // double click type raw "zzz" // press command + shift + "T" click radio "Page" dropdown "All Pages" dropdown "Right" near "Horizontal" dropdown "Top*" near "Vertical" dropdown "Page Margin" check "Use Right Page*" dropdown "Left" near "Use Right Page*" tab type "0" tab type "0" tab type "0" tab type "0" button "ok" // menu item "view/zoom/other..." type "100" button "ok" // Search "zzz" Replace "Instrument" [Arial] 16 fixed End
(Obviously this is Mac based so if you try it out on a PC, well, I'm sure you know what to do. I tried this in 2010 and 2009 and they both worked.) 
At the start of the script I zoom in to 300%, which (almost) guarantees that the "double click" that follows will actually be clicking on the page. It's kind of sneaky because it also makes sure the mouse pointer is in the centre of the page when it clicks "ok" to exit the zoom dialogue.
Sometimes I find that getting FS to press the keyboard shortcuts for menu items works better than going directly to a menu item. e.g. 'press command + shift + "T"' seems more reliable that writing 'menu item "Frame Attributes..."'. Although the other menu items work ok for me. Hmmm...
All the 'tab, type "0"' commands are resetting the frame's position offsets. By adjusting these settings you could position the part names where-ever you like and have specific settings for specific instruments.
I didn't know you could so easily set the font and style with the search and replace function. That's really cool!
NOTE: If you try this out, just make sure that the FS palette isn't open in the middle of the page, as the "double click" function relies on the Finale file being clickable.
JL Finale 2000, 2004-2010 Dual 2.0GHz Power PC G5, 3.5GB RAM, OS 10.4.11 MacBook Pro, 2.8GHz, 4GB RAM, OS 10.5.8 Sibelius 5.0Post Edited (James L) : 10/30/2009 3:34:06 AM (GMT-5) | | Back to Top | |
 |  James L Registered Member
        Date Joined Oct 2009 Total Posts : 30 | Posted 10/30/2009 7:41 AM (GMT -5) |   | #3! A not-so-practical workaround, for Fin 2010 (doesn't work in 2009 )
It's a little crazy and I've borrowed RP's idea of luring the mouse pointer into the appropriate position. It works best if your staff optimisation has been removed.
measure tool menu item "Edit Measure Number Regions..." dropdown "square" near "Show on Every" dropdown "rectangle" near "Show on Every" enter key // select instrument 1 to 2 staff tool menu item "Add Group and Bracket..." click wait 0.1 second enter key
If you are actually using those measure number enclosures then simply set the second dropdown menu item to the shape you want to use. (There have to be two dropdown changes because the mouse won't go there if the first dropdown happens to be set with the same setting that the FS tries to change it to... if that makes sense.)
There also needs to be a slight pause after selecting the bracket, otherwise the bracket gets applied to the entire score. Weird.
If you want to manually pre-select which staves you want to group together, just take the line "select instrument 1 to 2" out of the script. It should still work as long as you have your desired staves selected.
Let me know if this works for anyone, as it probably won't work if people have altered the positions of their dialogue boxes or if my dialogue boxes aren't in the same spots... speaking of which, I'm sure one could line up another dialogue box's "OK" button under the appropriate bracket and then use that function before editing the Group attributes. Just a thought.
JL Finale 2000, 2004-2010 Dual 2.0GHz Power PC G5, 3.5GB RAM, OS 10.4.11 MacBook Pro, 2.8GHz, 4GB RAM, OS 10.5.8 Sibelius 5.0Post Edited (James L) : 10/30/2009 7:34:50 AM (GMT-5) | | Back to Top | |
| Forum Information | Currently it is Thursday, September 02, 2010 4:57 PM (GMT -5) There are a total of 255,602 posts in 40,845 threads. In the last 3 days there were 34 new threads and 175 reply posts. View Active Threads
| | Who's Online | This forum has 24375 registered members. Please welcome our newest member, GEvans8. 27 Guest(s), 3 Registered Member(s) are currently online. Details QcCowboy, Oleg, PIOTR |
Forum powered by dotNetBB v2.42EC SP3 dotNetBB © 2000-2010 |
|
|