|
|
#1 |
|
Help tweaking applescript in service workflow
Would love any help with this to improve my workflow:
I found an applescript online that I have used to build a service within automator. It allows me to right click on a .pages document and convert it to pdf. Currently though, the naming of the file isn't working quite as I expected: Example.pages [right click, run pages2pdf service] (output-->) Example.pagesExample.pdf Here is the applescript: Code:
on run {input, parameters}
-- based on code from http://pagesfaq.blogspot.com/2006/11/i-have-one-thousand-pages-documents-to.html
--on open theFiles
set outputFiles to {}
set theFiles to input
tell application "Pages"
repeat with aFile in theFiles
open aFile
set docName to name of front document
set docPath to path of front document
-- Remove .pages extension.
set prevTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to ".pages"
-- Add .doc extension.
set docName to first text item of docName
set AppleScript's text item delimiters to prevTIDs
-- Save file in same folder
set docPathAndName to docPath & docName
save front document as "SLDocumentTypePDF" in docPathAndName
close front document
set end of outputFiles to docPathAndName & ".pdf"
end repeat
end tell
--end open
return outputFiles
end run
(running OS X 10.6.7) |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Looking for a specific idea for help in my workflow .... | eroxx | Mac OS X | 0 | May 7, 2011 10:23 AM |
| Handling Duplicate AppleScripts | the Otter | Mac Programming | 1 | Dec 22, 2010 05:53 AM |
| help with excel for mac 2008 | damiang72 | Mac Applications and Mac App Store | 0 | Nov 14, 2010 06:19 AM |
| applescript - launch workflow after | cottonn | Mac Programming | 0 | Mar 7, 2010 08:43 AM |
| Help tweaking a setting in Thunderbird mail client | Kevster89 | Mac Applications and Mac App Store | 5 | Apr 1, 2009 05:36 PM |
All times are GMT -5. The time now is 08:25 PM.






Linear Mode

