the "tell" verb specifies the target object in applescript.
so if there is only one line,
> tell application "Preview"
> print POSIX file "/Volumes/SnapServer/Test_Invoices/Checon_Invoices/2019/04 -
> April/224747_04_12.PDF" with print dialog
> end tell
could be reduced to
> tell application "Preview" to print POSIX file
> "/Volumes/SnapServer/Test_Invoices/Checon_Invoices/2019/04 -
> April/224747_04_12.PDF" with print dialog
on the other hand, you can have multiple lines,
> tell application "Preview"
> print POSIX file "/Volumes/SnapServer/Test_Invoices/Checon_Invoices/2019/04 -
> April/224747_04_12.PDF"
> print POSIX file "/Volumes/SnapServer/Test_Invoices/Checon_Invoices/2019/04 -
> April/224747_04_13.PDF"
> print POSIX file "/Volumes/SnapServer/Test_Invoices/Checon_Invoices/2019/04 -
> April/224747_04_14.PDF"
> end tell
you can also pass print settings
tell application "Preview"
print POSIX file "/Volumes/SnapServer/Test_Invoices/Checon_Invoices/2019/04 -
April/224747_04_12.PDF" with properties {copies:2, collating:true, starting
page:2}
end tell
etc.
> 2019/06/27 5:50、Chuck Miller via 4D_Tech <[email protected]>のメール:
>
> I have the code I use to create it and will share should someone else have a
> need. I am posting for a few reasons. Someone posted about printing
> PDFs and I found the windows solution but none for a MAC. This one works.
> Can you print more than one document? if so do I need a second tell
> application or is there some other way. I do not want to muck around to
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************