PDF를 임시 공간으로 내보내고 사용하고 사과 스크립트를 사용하여 파일을 인쇄하는 파일 메이커 스크립트를 함께 연결하려고합니다.전체 필드에 Applescript 포함 (컨테이너 및 Acrobat으로 트리거 인쇄 내보내기)
이 보드와 다른 보드에서 정보를 수집하여 폴더에서 Acrobat을 사용하여 PDF를 인쇄하는 applescript를 만들 수있었습니다.
관련 첨부 파일을 찾아서 데스크톱으로 내보내는 스크립트를 이미 만들었습니다.
두 가지를 병합하는 데 문제가 있습니다. 이 위대한 제안은 chivalrysoftware.com/...의 척에 의해 제공되었다
내가 폴더 또는 임시 장소로 PDF를 내보내고 인쇄를 시작하기 위해 사과 스크립트를 실행하는 데 필요
...
Get (TemporaryPath)에 파일 이름을 추가하여 내보낼 위치를 계산하십시오. 컨테이너 필드 내용을 FileMaker로 해당 경로로 내 보냅니다.
set myFolder to (path to desktop folder as text) & "Print:"
set myfiles to list folder myFolder without invisibles
repeat with myfile in myfiles
set mycurrentfile to ((myFolder as string) & (myfile as string)) as string
batchprint(mycurrentfile)
end repeat
on batchprint(mycurrentfile)
tell application "Adobe Acrobat Pro"
activate -- bring up acrobat
open alias mycurrentfile -- acrobat opens that new file
tell application "System Events"
tell process "Acrobat"
click menu item "Print..." of menu 1 of menu bar item "File"¬
of menu bar 1
click button "Print" of window "Print"
tell application "System Events"
tell process "Acrobat"
click menu item "Close" of menu 1 of menu bar item "File"¬
of menu bar 1
end tell
end tell
end tell
end tell
end tell
tell application "Finder" -- to move the printed file out
set x to ((path to desktop folder as text) & "Printed PDFs:")
if alias x exists then
beep
else
make new folder at the desktop with properties {name:"Printed PDFs"}
end if
move alias mycurrentfile to folder "Printed PDFs"
end tell
end batchprint
: 저장 파일 메이커 를 사용하여 임베디드 애플 스크립트의 글로벌 필드의 경로 미리보기에서 파일을 열고이 내 애플 스크립트입니다 그것을
를 인쇄하는 글로벌 필드 경로 사용 AppleScript에 액세스 할 수 내 Filemaker 스크립트는 다음과 같습니다.
Go to Related Record[
Show only related records; From table: 'Attachments";
Using layout: "Attachements Report' (Attachments); New window
]
Enter Find Mode
Constrain Found Set [Restore]
Sort Records [Restore; No dialog]
# After finding the related attachments and constraining them to the specific type
# we rename and export them to the desktop
Go to Record/Request/Page [First]
Loop
Set Variable [$Path; Value:
Get (DesktopPath) & Attachments::Record number & "-"
& Attachment Type List 2::Prefix_z & Lien::Lien_ID_z1]
Export Field Contents [Attachments::file_c; $Path]
Go to Record/Request/Page [Next: Exit after last]
End Loop
Close Window [Current Window]
스크립트 디버거를 사용할 때 다음과 같은 오류가 발생합니다. 스크립트 단계에서 내보내기 필드 - 오류 : "$ 경로"를이 디스크에 만들 수 없습니다. 다른 이름을 사용하고 디스크 공간을 늘리거나 잠금을 해제하거나 다른 디스크를 사용하십시오. \t \t \t \t \t 내 보낸 항목 [Attachments :: file_c; $ 경로] 에 AppleScript로 단계를 수행하여 오류 : 개체가 아닙니다 발견 및 오류 : 알 수없는 오류 : -1728 애플 스크립트 (batchprintfmycurrentfile에 셀의 내용에 '설정 _pdf_path "현재의 레이아웃 batchprint (_pdf_path의 g_applescript_parameter)) 최종 배치 인쇄를 수행 "] – drbronze
글로벌 필드를 문자열"$ Path "로 설정하고 변수'$ Path'의 내용을 설정하지 않은 것 같습니다. 두 개의'Set Variable' 스텝과'Set Field' 루프의 단계에서 올바른 계산식을 사용하고 있습니다. FileMaker Pro Advanced를 사용하는 경우 디버거와 데이터 뷰어를 사용하여 각 단계가 생각대로 실행되는지 확인할 수 있습니다. 고급 기능이없는 경우 ' 사용자 정의 메시지 표시 '를 클릭하면 내용이 무엇인지 보여줍니다. – Chuck
나는 이걸 가지고 진짜 깡충 거린다. 나는 너의 지시를 다시 읽었다. 12 번 작동하면 작동하지 않을 수 있습니다 ... 나는 여기에 게시 할 수 없기 때문에 작동하지 않는 수정 된 코드로 새로운 질문을 게시 할 예정입니다. 잠시 기다려 주시기 바랍니다. 검토 ... 당신의 도움에 감사드립니다 ... – drbronze