Finale SmartMusic
  Home | Log In | Register | Search | Help
   
MakeMusic Forum > Public Forums > FinaleScript - FORUM HAS MOVED! > Search and Replace Problem  Forum Quick Jump
 
You cannot post new topics in this forum. You cannot reply to topics in this forum. Printable Version
[ << Previous Thread | Next Thread >> | Show Newest Post First ]

Graeme Gilmore
Registered Member

Click to send Graeme Gilmore email.Personal Homepage Not AvailableSend a Private Message to Graeme GilmoreAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2000
Total Posts : 371
 
   Posted 4/29/2004 6:36 AM (GMT -6)    Quote This PostAlert An Admin About This Post.
Search and Replace problem (Finale version 2004b.r1)
 
I am working on a script to replace the apostrophe and quotes to the curly forms.
 
The following will change a straight apostrophe to a curly one
search “'” replace “’” — with the curly apostrophe entered by typing the ASCII character, ALT 0146, directly in the Finale Script Editor.
 
The problem comes when I export the script to Word and then import it back into Finale. All the curly quotes and apostrophes in Word are converted back to the plain variety in Finale, a long-standing situation.
 
To allow me to edit the script in Word, I thought I would substitute the ASCII code for the curly apostrophe (ASCII 0146), but that doesn’t seem to work. I cannot get Search and Replace to accept the following command
 
search ”'” replace <0146>
 
I also tried "<0146>" and "^<0146>" and ^<0146> without success
 
Am I writing the code incorrectly?
 
 
Thanks for the help. 


Graeme
 
Finale 2004b.r1, Windows XP, TGTools

Post Edited (Graeme Gilmore) : 4/29/2004 11:39:28 AM GMT

Back to Top

Peter Thomsen
Registered Member

Click to send Peter Thomsen email.Personal Homepage Not AvailableSend a Private Message to Peter ThomsenAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 2000
Total Posts : 8331
 
   Posted 4/29/2004 7:25 AM (GMT -6)    Quote This PostAlert An Admin About This Post.
My guess is that you should take a good look at Word's preferences.

You might find an option about automatic substitution of quotes.

Alternatively you could try another word processor than Word.

I suppose that even the smallest, simplest word processor can handle scripting code.

Peter
Back to Top

Michael Johnson
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailableSend a Private Message to Michael JohnsonAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2004
Total Posts : 1317
 
   Posted 5/5/2004 1:37 PM (GMT -6)    Quote This PostAlert An Admin About This Post.
Hi Graeme --

I agree with Peter. The problem stems from the MS Word auto-formatting of Smart Quotes. For me, in Word going Format menu >> Auto Format... Options, there is a check box for smart Quotes. You could try NotePad or TextPad as text editing tools to use instead of Word.

Cheers,


Michael Johnson
QA Supervisor
MakeMusic!

Back to Top

Graeme Gilmore
Registered Member

Click to send Graeme Gilmore email.Personal Homepage Not AvailableSend a Private Message to Graeme GilmoreAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2000
Total Posts : 371
 
   Posted 5/5/2004 9:16 PM (GMT -6)    Quote This PostAlert An Admin About This Post.
Yes, I agree with what you say. What I was trying to achieve, though, was a search or replace instruction that was immune to the problem. That led me to try to search and replace actual ASCII codes. They are listed as one of the <> options, but I haven’t see any particular way FinaleScript planned to use them. I was pushing the limits, trying to use them in Search and Replace.
Presumably, since no one has suggested how to do it, I cannot use ASCII codes in the way I was trying and the problem was not that I just didn't know how to go about it.
By the way, I tried copying a curly apostrophe created in Finale into Word (it stayed curly). But copying it from Word (no changes, just immediately highlight and copy) back into Finale did not work. The curly apostrophe reverted to a straight apostrophe. So turning off curly quotes makes no real difference.
Thanks for the information


Graeme
 
Finale 2004b.r1, Windows XP, TGTools

Back to Top

Michael Johnson
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailableSend a Private Message to Michael JohnsonAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2004
Total Posts : 1317
 
   Posted 5/7/2004 8:54 AM (GMT -6)    Quote This PostAlert An Admin About This Post.
Hi Graeme --
I apologize for misunderstanding your question. Yes, you could create a little script to just convert the characters. Unfortunately, I have found that there is a problem in the FS plug-in on Windows. I have documented the issue. The Search and Replace of ASCII Characters functionality does not work in FinaleScript. As a temporary solution on Win, you can use the Text Search and Replace plug-in in Finale 2004 to find smart quotes (0147 and 0148) and replace with straight quotes (34)
To do this:
Bring up the TSAR plug-on
For the front side quote:
in Search field hold down Alt and type 0147 on the Numpad (or paste in the character from the clipboard)
FYI: on Mac the keystroke is Option+[
in Replace field Shift+'
For the back side quote:
in Search field hold down Alt and type 0148 on the Numpad (or paste in the character from the clipboard)
FYI: On Mac the keystroke is Option+Shift+[
in Replace field Shift+'
This worked for me and I would be interested if it didn't work for you.
The FS syntax to make ASCII character replacement work is as follows. Because Smart quotes are in different slots on Mac and Win, I will show both scripts. Again, this won't work on Windows. I apologize for that and have documented the issue.
//start Mac Script
process open doc
search "<210>" replace "<34>"
search "<211>" replace "<34>"
//end Mac Script


//Start Win Script
process open doc
search "<147>" replace "<34>"
search "<148>" replace "<34>"
//end Win Script
Thanks for your interest in FinaleScript,


Michael Johnson
QA Supervisor
MakeMusic!

Back to Top

Graeme Gilmore
Registered Member

Click to send Graeme Gilmore email.Personal Homepage Not AvailableSend a Private Message to Graeme GilmoreAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2000
Total Posts : 371
 
   Posted 5/8/2004 9:31 PM (GMT -6)    Quote This PostAlert An Admin About This Post.
Thanks for the information. However, what I want to do is to take straight quotes and apostrophe's and convert them to curly. However, when I tried that there were several problems.
 
Sorry, the rest of this entry is hard to follow because I can't use quotes to help clarify quoted text since they are the focus of the discussion. Basically, when I searched on a symbol (e.g., ') and replaced it using as ASCII character as described in Michael Johnson's entry yesterday, TSAR throws in a character not part of the Times New Roman Font (displayed as a square)
 
 
My test phrase -- including the quotes -- was the lyric "This is O'Hara."
 
After using TSAR search ", replace <146> [Win curly apostrophe]
In the Edit Lyrics window it showed "This is O’Hara.” However, the lyric under the music showed "This is O’
 
The curly apostrophe was there but the Hara." was no longer visible.
 
Then I set the phrase up again as at the beginning
 
This time I used TSAR search ", replace <147>
 
In the Edit Lyrics window it showed “This is O'Hara.”   However, all the lyric under the music showed was “ [curly quote was the only thing visible under the first note] This is
 
Clearly a character not in the Times New Roman set was being added in addition to the changed quote or apostrophe symbol.
 
So, it seems there are other oddities when trying to search and replace using ASCII code in the Windows Finale.
 
 


Graeme
 
Finale 2004b.r1, Windows XP, TGTools

Back to Top

Jim Coull
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailableSend a Private Message to Jim CoullAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jun 1999
Total Posts : 2723
 
   Posted 5/9/2004 12:24 PM (GMT -6)    Quote This PostAlert An Admin About This Post.
Graeme,

I don't know if this will help or not (or even if it applies here), but in most word processors, when you select curly quotes as an option in the word processor, it does not replace the straight quotes and apostrophes (" & ') with the actual ASCI character for the curly quotes/apostrophes. If you want a "true" curly quote, you have to actually type it (i.e., opt-[ on the Mac). It's similar to difference that you get when you apply the bold or italic style to a roman font like Times. Applying italic to Times is not the same as selecting ITimesItalic from the font menu.
Back to Top

Michael Johnson
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailableSend a Private Message to Michael JohnsonAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2004
Total Posts : 1317
 
   Posted 5/10/2004 1:19 PM (GMT -6)    Quote This PostAlert An Admin About This Post.
Hi Graeme,
 
I had a different experience from you with regard to your example. I did not get the extra character tacked on to the end. Perhaps in your "replace" field of TSAR, you included a character in addition to the <146> character.
 
I will add your name to the list of users requesting "smart" functionality for apostrophes and quotation marks.
 
Cheers,


Michael Johnson
QA Supervisor
MakeMusic!

Back to Top

Graeme Gilmore
Registered Member

Click to send Graeme Gilmore email.Personal Homepage Not AvailableSend a Private Message to Graeme GilmoreAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2000
Total Posts : 371
 
   Posted 5/10/2004 8:58 PM (GMT -6)    Quote This PostAlert An Admin About This Post.
I don't know why we get different results, but my replace field consisted only of an ACCII code (e.g.,
<147>
TSAR reliably adds the strange character in this situation.
Anyway, it would be nice to have curly quotes and apostrophe's available, so I'm glad you added me to the list.



Graeme
 
Finale 2004b.r1, Windows XP, TGTools

Back to Top
You cannot post new topics in this forum. You cannot reply to topics in this forum. Printable Version
   
Forum Information
Currently it is Thursday, November 21, 2019 7:05 PM (GMT -6)
There are a total of 403,820 posts in 58,165 threads.
In the last 3 days there were 0 new threads and 0 reply posts. View Active Threads