Applescript to edit several .pages files and make them have all bold text?
No very little about apple script but I would like to drop a bunch of .pages files on a script and convert all the text to bold
This was my first attempt:
on opentheFiles
tell application "Pages"
repeat with aFile in theFiles
openaFile
set bold to true
set docName to name of front document
-- Remove .pages extension.
set prevTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to ".pages"
-- Add .pdf extension.
set docName to first text item of docName & ".pdf"
set AppleScript's text item delimiters to prevTIDs
-- Get folder that dropped file exists in.
tell application "Finder"
set sourceFolder to (container of aFile) as Unicode text
end tell -- Finder
-- Save file to folder that dropped file exists in.
set docPathAndName to sourceFolder & docName
save front document as "SLDocumentTypePDF" in docPathAndName
close front document
end repeat
end tell
end open
Any help will be appreciated!
Kay Fisher