ExecuteFormFieldScriptWithRepliesJSON

양식 필드와 JavaScript

설명

AcroForm 필드 이벤트 스크립트를 실행하면서 JSON에서 결정론적 app.alert·app.response 호스트 회신을 재생합니다

구문

Delphi

Function TPDFlib.ExecuteFormFieldScriptWithRepliesJSON(Index, Action: Integer; Const Value, Change: WideString; SelStart, SelEnd, Flags: Integer; Const RepliesJSON: WideString): WideString;

매개변수

Index1 기준 양식 필드 인덱스
Action이벤트 셀렉터. 0 validate, 1 calculate, 2 format, 3 keystroke
Valueevent.value에 공급되는 후보 필드 값
Changekeystroke 이벤트에서 event.change에 공급되는 삽입 또는 치환 텍스트
SelStart, SelEndkeystroke 이벤트 전의 0 기준 선택 범위
Flags1 willCommit, 2 fieldFull, 4 keyDown, 8 modifier, 16 shift를 조합한 비트마스크
RepliesJSONapp.alert 버튼 코드와 app.response 문자열 또는 null의 순서 있는 타입 지정 회신을 담은 JSON 배열 또는 객체

반환 값

실행 상태, 결과 value, change, rc, 선택 범위, 소비된 호스트 대화상자를 보고하는 JSON 객체를 반환합니다.

비고

스크립트의 각 app.alert·app.response 호출을 UI 대화상자를 띄우지 않고 요청 순서로 RepliesJSON의 다음 항목과 대조합니다.

필수 회신이 없거나 일치하지 않거나 소비되지 않고 남으면 문서 필드 변경을 보류합니다.

참고 항목

ExecuteFormFieldScriptJSON, SetFormScriptHostActionMode, GetFormScriptDiagnostics