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 open theFiles
tell application "Pages"
repeat with aFile in theFiles
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
Any help will be appreciated!
Obviously the bulk of the script is to create pdf files.
I just tried to piggy back onto that and BOLD everything.
Retrieving data ...