У меня есть AppleScript для открытия веб-страницы Safari в представлении Reader, а затем для сохранения в виде PDF.Applescript 'Сохранить как'
Я бы хотел его сохранить как PDF с именем файла по умолчанию, но всегда в том же конкретном месте. Я не уверен, как это сделать.
В настоящее время AppleScript работает как:
tell application "System Events"
tell application process "Safari"
set frontmost to true
repeat until window 1 exists
end repeat
# Render page in Safari Reader
keystroke "r" using {command down, shift down}
delay 0.02
-- Print; wait until the sheet is visible
click menu item "Print…" of menu 1 of menu bar item "File" of menu bar 1
repeat until sheet 1 of window 1 exists
end repeat
set thePopUp to first pop up button of sheet 1 of window 1 whose description is "Presets"
click thePopUp
click menu item "Default Settings" of menu 1 of thePopUp --replace if desired with your preferred preset
click menu button "PDF" of sheet 1 of window 1
click menu item "Save as PDF…" of menu 1 of menu button "PDF" of sheet 1 of window 1 -- Save as PDF...
tell application "Finder"
set filesavepath to "/Users/Ariel/Google Drive/To print"
end tell
end tell
конца сказать
Конечных битам AppleScript, от 'сказать приложения находки на самом деле не сделать страницу сохранения в моем желаемом месте. Пожалуйста, не могли бы вы мне помочь. Спасибо за любую помощь.
Ариэль