Moderatore: ModiMaccanici
ho provato con TextEdit.. Appena metto mano su un mac con Word (che versione hai?), ti mando lo script..franz.bianchi ha scritto: ↑mer, 08 mag 2019 18:28Ehm.... non sono certo di aver capito. Intendi fare tutto da terminale?
Codice: Seleziona tutto
property theList : {"doc", "docx"}
on run {input, parameters}
set output to {}
tell application "Microsoft Word" to set theOldDefaultPath to get default file path file path type documents path
repeat with x in input
try
set theDoc to contents of x
tell application "Finder"
set theFilePath to container of theDoc as text
set ext to name extension of theDoc
if ext is in theList then
set theName to name of theDoc
copy length of theName to l
copy length of ext to exl
set n to l - exl - 1
copy characters 1 through n of theName as string to theFilename
set theFilename to theFilename & ".pdf"
tell application "Microsoft Word"
set default file path file path type documents path path theFilePath
open theDoc
set theActiveDoc to the active document
save as theActiveDoc file format format PDF file name theFilename
copy (POSIX path of (theFilePath & theFilename as string)) to end of output
close theActiveDoc
end tell
end if
end tell
end try
end repeat
tell application "Microsoft Word" to set default file path file path type documents path path theOldDefaultPath
return output
end run
O nella cartella "Services" dentro "Libreria" che trovi aprendo l'hard-disk di sistema o, più probabile, nella cartella "Services" dentro "Libreria" del tuo utente.franz.bianchi ha scritto: ↑mer, 08 mag 2019 21:08Ma dove lo trovo quello che ho creato ? Dove vengono salvati i servizi ? Dovrei girarlo al mio socio.
Ciao, se hai a disposizione ancora un po' di tempo, entro domani ti creo un video su come fare.. ok?franz.bianchi ha scritto: ↑mer, 08 mag 2019 21:46trovato nella libreria nascosta. Grazie ancora mi hai risolto un problema.
Visitano il forum: Ahrefs [Bot], SemrushBot [Bot] e 9 ospiti