MACSCRPT Archives

February 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Levon Spradlin <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 19 Feb 2008 14:13:23 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (67 lines)
    I have been receiving files that have the Masculine Ordinal Indicator
instead of the standard Degree Sign. It is a bit random, sometimes mixed in
a folder. The files have multiple text boxes and sometimes art as well. The
fonts usually do not change. Am I going in the right direction with this? I
havenąt had much time in the last few months to address AppleScript amongst
my numerous responsibilities, so I continuously feel like I am re-learning
As when I pick up a project again. Any help is appreciated.

--This script will change the
--U+00B0 (MASCULINE ORDINAL INDICATOR)
--characters to
--U+00BA (DEGREE SIGN).

copy text item delimiters of AppleScript to savedDelim
set text item delimiters of AppleScript to {":"}
set text item delimiters of AppleScript to savedDelim

set charInput to «data utxt00BA»
set charOutput to «data utxt00B0»

display dialog "Input - Masculine Ordinal Indicator: " & charInput & return
& "Output - Degree Sign: " & charOutput

set sourceFolder to choose folder with prompt "Choose the folder to
process."
tell application "Finder" to set theFiles to files of folder sourceFolder
whose kind contains "QuarkXPress"
repeat with oneFile in theFiles
    tell application "QuarkXPress"
        activate
        open (oneFile as alias)
        tell front document
            repeat with p from 1 to count of pages
                repeat with a from 1 to count of text boxes
                    repeat with c from 1 to count of characters
                        if c is charInput then
                            set c to charOutput
                        end if
                    end repeat
                end repeat
            end repeat
        end tell
    end tell
    --close saving yes --uncomment when done
end repeat

--display dialog "Character change done."



Levon Spradlin
Technology Manager, Texas Desktop Publishing Support Services
Pearson | Assessment & Information
512-989-5300 x 3989
[log in to unmask]

•



**************************************************************************** 
This email may contain material confidential to
Pearson.  If you were not an intended recipient, 
please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

ATOM RSS1 RSS2