English version see below

PDAP Script ist eine sog. domänenspezifische Script Ergänzung für das CAQ System PDAP7, um Makos für automatisierte Abläufe erstellen zu können. Domänenspezifisch heißt in diesem Fall, dass die Syntax speziell auf das PDAP7 CAQ System zugeschnitten ist. Innerhalb der PDAP7 Anwendung wird PDAP-Script automatisch an mehreren Stellen verwendet, ohne dass Sie es im Grunde merken. Z.B, bei der automatischen Versendung von Emails aufgrund auffälliger Prüfaufträge oder dem Kopieren von Q-Links.
Neben dem Aufruf von Formularen stehen mit PDAP-Script weitere Möglichkeiten zur Verfügung. So kann beispielweise ein Schleifensteuerung programmiert werden werden, bis hin zu einer Sprachausgaben mit Info Balloons, die Sie für Präsentationen nutzen können. Hier nur ein paar Beispiele für PDAP Scripte. Die Dateien die hierbei verwendet werden sind einfache Textdateien die mit der Endung .CAQ gespeichert werden. Zum Öffnen dieser Dateiendung ist dann die PDAP7 Anwendung (pdap.exe) anzugeben:
Das folgende Script sendet eine E-Mail aus der Anwendung heraus, mit einem automatisch erstellen Report im PDF-Format. Das BeispielScript holt dafür den ersten Eintrag aus der Auswertungshistorie der Kostenauswertung im Reklamationsmanagement. Dafür muss allerdings ein entsprechendes SMTP Konto in PDAP7 eingetragen sein PDAP7 selbst verwendet ein solches Script um über auffällige Prüfaufträge zu informieren:
CM_PSP_ACTION
#PspWaitForLogin
;Link
PspDbParams,interbase,PDAP
PspBringToFront
PspExecMethod,,Menu_FehlerauswertungClick
PspExecMethod,frmFehlerauswertung,sbtn_LoadClick
PspGoToPKey,frmListeFSK_AW_Anzeige,First
PspWait,200
PspExecMethod,,Menu_FehlerauswertungClick
PspExecMethod,frmListeFSK_AW_Anzeige, sbtn_auswahl_uebernehmenClick
PspExecMethod,frmFehlerauswertung,sbtn_Start_SucheClick
PspWait,200
PspExecMethod,frmFehlerauswertung,sbtn_Start_SucheClick
PspWait,200
PspExportReport,frmFskChart_FAW,3312,C:\temp\report_fsk1.pdf
;PspSendEMailMessage,[dont care. Formularname],[Host],[Subject],[To],[CCList],[From],[MailText],[Path],[Attachments],[opt. ShowFileNames 0 | 1]
PspSendEMailMessage,, mail.jessenlenz.com, -Auswertung Fehlersammelkarte-, marktobias@msn.com, horst.strohkirch@jessenlenz.com`nmark.hausmann@jessenlenz.com, mark.hausmann@jessenlenz.com, Auswertung Fehlersammelkarte von PDAP7 Agent - Zugestellt am %Date%,C:\temp\doc_fsk,report_fsk1.pdf,
Folgendes Script sorgt dafür, dass von einer laufenden PDAP7 Anwendung, die erste Fehlersammelkarte, der gespeicherten Auswertungen aus "Fehlersammelkarte | Auswertung" als wmf Dateien in die Zwischenablage kopiert wird.
CM_PSP_ACTION
PspExecMethod,,Menu_FehlerauswertungClick
PspExecMethod,frmFehlerauswertung,sbtn_LoadClick
PspGoToPKey,frmListeFSK_AW_Anzeige,First
PspWait,200
PspExecMethod,,Menu_FehlerauswertungClick
PspExecMethod,frmListeFSK_AW_Anzeige, sbtn_auswahl_uebernehmenClick
PspExecMethod,frmFehlerauswertung,sbtn_Start_SucheClick
PspWait,200
PspExecMethod,frmFehlerauswertung,sbtn_Start_SucheClick
PspWait,200
PspExecMethod,frmFskChart_FAW,menu_Chart_CopyClick
Erklärung einiger Funktionen von PDAP-Script
CM_PSP_ACTION:
sendet in PDAP7 eine Nachricht für eine Scriptausführung
PspExecMethod, [opt. Empfänger Formularname], [Name der veröffentlichten Methode]:
Anweisung zur Ausführung einer Methode in einem bestimmmten PDAP7 Formular.
PspWait, [Zeit in ms]:
Verzögerungszeit in Millisekunden bis zur nächsten Anweisung. Dies wir je nach Verhalten in PDAP7, an verschiedenen Stellen benötigt, um das gewünschte Verhalten zu erreichen.
PspGoToPKey, [Empfänger Formularname], [First | Next | Prior | IdValue]
Datensatzwechsel in dem angegebenen Formular
PspIncludeFile, [FileName]
Datei an in aktuelle Ausführungsposition laden. Falls z.B. ein Abschnitt mehrfach verwendet werden soll, kann man mit dieser Funktion, eine Datei an die aktuelle Ausführungsposition laden.
PspExportReport,[opt. Formularname],[Report Id],[ExportFilename.PDF | GIF | JPG | HTML]
Der Report wird in der angegebenen Datei erstellt. Der Dateityp wird aus der Dateierweiterung abgeleitet. Die Report Id kann in PDAP7 über die Formularverwaltung und den lokalen Menüpunkt "Schlüssel anzeigen" ermittelt werden. Der Formularname ist optional. Wird dieser Eintrag ausgelassen, wird das aktive Formular verwendet.
<<English>>
Macro Automation mit PDAP-Script
PDAP-Script is a so called domain-specific scripting extension designed to meet especially the requirements inside the PDAP application. Automated flows can macros can be built on PDAP-Script. The PDAP application itself runs PDAP-Script tasks automatically under the hood when sending an email about a significant inspection order for example.
Besides the call of forms there is some other functionality supported by PDAP-Script script. For example, a loop can be programmed ore a voice output together with an info balloon for presentation purpose. Here in the following are just a few examples of scripts. The files that are used here are simple text files that are saved with the extension CAQ. To open this file extension the application PDAP7 (pdap.exe) application has to be registered for the CAQ extension.
The following script sends an e-mail from the application together with a report in PDF format. Therefore the example script takes the first entry in the history of cost analysis from claims analysis. However, it must be a corresponding SMTP account be registered in the PDAP system to make this working.
CM_PSP_ACTION
#PspWaitForLogin
;Link
PspDbParams,interbase,PDAP
PspBringToFront
PspExecMethod,,Menu_FehlerauswertungClick
PspExecMethod,frmFehlerauswertung,sbtn_LoadClick
PspGoToPKey,frmListeFSK_AW_Anzeige,First
PspWait,200
PspExecMethod,,Menu_FehlerauswertungClick
PspExecMethod,frmListeFSK_AW_Anzeige, sbtn_auswahl_uebernehmenClick
PspExecMethod,frmFehlerauswertung,sbtn_Start_SucheClick
PspWait,200
PspExecMethod,frmFehlerauswertung,sbtn_Start_SucheClick
PspWait,200
PspExportReport,frmFskChart_FAW,3312,C:\temp\report_fsk1.pdf
;PspSendEMailMessage,[dont care. Formularname],[Host],[Subject],[To],[CCList],[From],[MailText],[Path],[Attachments],[opt. ShowFileNames 0 | 1]
PspSendEMailMessage,, mail.jessenlenz.com, -Auswertung Fehlersammelkarte-,
marktobias@msn.com,
horst.strohkirch@jessenlenz.com`nmark.hausmann@jessenlenz.com,
mark.hausmann@jessenlenz.com, Auswertung Fehlersammelkarte von PDAP7 Agent - Zugestellt am %Date%,C:\temp\doc_fsk,report_fsk1.pdf,
The following script makes sure that a current PDAP7 application, the first error collector's card, the stored evaluation of "collective error map | Evaluation" as wmf files are copied to the clipboard.The following script runs inside a currently running PDAP7 application instance. It takes the first attribute chart evaluation from "attribute chart | Display" and copy it as a graphic into to windows clipboard.
CM_PSP_ACTION
PspExecMethod,,Menu_FehlerauswertungClick
PspExecMethod,frmFehlerauswertung,sbtn_LoadClick
PspGoToPKey,frmListeFSK_AW_Anzeige,First
PspWait,200
PspExecMethod,,Menu_FehlerauswertungClick
PspExecMethod,frmListeFSK_AW_Anzeige, sbtn_auswahl_uebernehmenClick
PspExecMethod,frmFehlerauswertung,sbtn_Start_SucheClick
PspWait,200
PspExecMethod,frmFehlerauswertung,sbtn_Start_SucheClick
PspWait,200
PspExecMethod,frmFskChart_FAW,menu_Chart_CopyClick
Explanation of some features of PDAP-Script
CM_PSP_ACTION:
sends a message to strat script execution
PspExecMethod, [opt. Receiver form name], [Name of a published Methode]:
Instruction to execute a method in a distinct PDAP7 form.
PspWait, [Time in ms]:
Delay time in milliseconds until the next instruction. This is sometimes needed, depending on the behavior in PDAP7, at various points to achieve the desired behavior.
PspGoToPKey, [Receiver Form name], [First | Next | Prior | IdValue]
Go to a record in the specified form
PspIncludeFile, [FileName]
File to load into current execution position. For example: A section should be used more than once, so you can load with this function, a file to the current execution position.
PspExportReport,[opt. form name],[Report Id],[ExportFilename.PDF | GIF | JPG | HTML]
The report is created in the specified file format. The file type is derived from the file extension. The Report ID from the template in PDAP7 report form management and can be discovered by the local menu item "Show form key".

Comments