0

我正在使用一个名为 3m cr100m 的设备,可用于从护照等输入数据。我正在运行以下脚本,但想在某个数据处理程序之后暂停,直到我按下某个键,例如 ctrl+W 或类似的键。

我使用它的应用程序是基于 2 页的。

第一页有姓名、性别和出生日期以及一些需要手动输入的数据然后单击下一步,第二页有护照号码、签发日期和到期日期。

下面是我使用称为键盘楔的程序的 3m cr100m 代码,该程序加载下面提到的脚本,该脚本位于 xml 文件中,仅用于我能理解的一点数据处理。

如果此设备的任何帮助 sdk 可在http://www.3m.com/ssdcp/3M%20Swipe%20Readers/SDK/3M%20Swipe%20Reader%20SDK%201.2.1.2%20Setup.exe获得

<?xml version="1.0"?>
<OutputWedge>



    <InputModule name="Swipe">
        <Parameters>
            <Parameter name="LogLevel" value="1" />
            <Parameter name="LogFileName" value="SwipeOutputWedge.log" />
            <Parameter name="DateOfBirthFormat" value="%d-%m-%y"/>
            <Parameter name="ExpiryDateFormat" value="%d/%m/%y"/>
        </Parameters>
    </InputModule>

    <OutputModules>
        <OutputModule name="Keyboard" alias="keyb">
            <Parameters>
                <Parameter name="DelayBetweenKeys" value="10" />
            </Parameters>
        </OutputModule>
    </OutputModules>

  <DataMerging>
    <DestDataItem name="General_DocumentNumber">
      <SrcDataItem name="CODELINE_DOC_NUMBER" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_DOC_NUMBER" priority="2" />
      <SrcDataItem name="AAMVA_PARSED_LICENCENUMBER" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_FullName">
      <SrcDataItem name="AAMVA_PARSED_FULLNAME" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_GivenNames">
      <SrcDataItem name="CODELINE_FORENAMES" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_FORENAMES" priority="2" />
      <SrcDataItem name="AAMVA_PARSED_GIVENNAMES" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_Surname">
      <SrcDataItem name="CODELINE_SURNAME" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_SURNAME" priority="2" />
      <SrcDataItem name="AAMVA_PARSED_SURNAME" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_Forename">
      <SrcDataItem name="CODELINE_FORENAME" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_FORENAME" priority="2" />
      <SrcDataItem name="AAMVA_PARSED_FORENAME" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_Forenames">
      <SrcDataItem name="CODELINE_FORENAMES" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_FORENAMES" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_MiddleName">
      <SrcDataItem name="AAMVA_PARSED_MIDDLENAME" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_NameSuffix,">
      <SrcDataItem name="AAMVA_PARSED_NAMESUFFIX" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_GivenNames,">
      <SrcDataItem name="AAMVA_PARSED_GIVENNAMES" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_SecondName,">
      <SrcDataItem name="CODELINE_SECOND_NAME" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_SECOND_NAME" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_Gender">
      <SrcDataItem name="CODELINE_SEX" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_SEX" priority="2" />
      <SrcDataItem name="AAMVA_PARSED_SEX" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_GenderLetter">
      <SrcDataItem name="CODELINE_SHORT_SEX" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_SHORT_SEX" priority="2" />
      <SrcDataItem name="AAMVA_PARSED_SHORTSEX" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_AddressStreet">
      <SrcDataItem name="AAMVA_PARSED_ADDRESS_STREET" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_AddressCity">
      <SrcDataItem name="AAMVA_PARSED_ADDRESS_CITY" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_AddressState">
      <SrcDataItem name="AAMVA_PARSED_ADDRESS_STATE" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_AddressPostalCode">
      <SrcDataItem name="AAMVA_PARSED_ADDRESS_POSTALCODE" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_AddressCountry">
      <SrcDataItem name="CODELINE_ISSUING_STATE" priority="1" />
      <SrcDataItem name="AAMVA_PARSED_ADDRESS_COUNTRY" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_IssuingState">
      <SrcDataItem name="CODELINE_ISSUING_STATE" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_ISSUING_STATE" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_Nationality">
      <SrcDataItem name="CODELINE_NATIONALITY" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_NATIONALITY" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_OptionalData1">
      <SrcDataItem name="CODELINE_OPTIONAL_DATA_1" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_OPTIONAL_DATA_1" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_OptionalData2">
      <SrcDataItem name="CODELINE_OPTIONAL_DATA_2" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_OPTIONAL_DATA_2" priority="2" />
    </DestDataItem>

    <DestDataItem name="General_DateOfBirth">
      <SrcDataItem name="CODELINE_DATE_OF_BIRTH_STR" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_DATE_OF_BIRTH_STR" priority="2" />
      <SrcDataItem name="AAMVA_PARSED_DATEOFBIRTH" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_IssueDate">
      <SrcDataItem name="AAMVA_PARSED_ISSUEDATE" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_ExpiryDate,">
      <SrcDataItem name="CODELINE_EXPIRY_DATE_STR," priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_EXPIRY_DATE_STR," priority="2" />
      <SrcDataItem name="AAMVA_PARSED_EXPIRYDATE" priority="2" />
    </DestDataItem>

    <DestDataItem name="General_DateOfBirthFormatted">
      <SrcDataItem name="CODELINE_DATE_OF_BIRTH_STR_FORMATTED" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_DATE_OF_BIRTH_STR_FORMATTED" priority="2" />
      <SrcDataItem name="AAMVA_PARSED_DATEOFBIRTH_FORMATTED" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_IssueDateFormatted">
      <SrcDataItem name="AAMVA_PARSED_ISSUEDATE_FORMATTED" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_ExpiryDateFormatted">
      <SrcDataItem name="CODELINE_EXPIRY_DATE_STR_FORMATTED," priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_EXPIRY_DATE_STR_FORMATTED," priority="2" />
      <SrcDataItem name="AAMVA_PARSED_EXPIRYDATE_FORMATTED" priority="2" />
    </DestDataItem>

    <DestDataItem name="General_CodelineData">
      <SrcDataItem name="CODELINE_DATA" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_DATA" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_Codeline1">
      <SrcDataItem name="CODELINE_LINE_1" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_LINE_1" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_Codeline2">
      <SrcDataItem name="CODELINE_LINE_2" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_LINE_2" priority="2" />
    </DestDataItem>
    <DestDataItem name="General_Codeline3">
      <SrcDataItem name="CODELINE_LINE_3" priority="1" />
      <SrcDataItem name="SCDG1_CODELINE_LINE_3" priority="2" />
    </DestDataItem>

    <DestDataItem name="General_Height">
      <SrcDataItem name="AAMVA_PARSED_HEIGHT" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_Weight">
      <SrcDataItem name="AAMVA_PARSED_WEIGHT" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_Hair_Color">
      <SrcDataItem name="AAMVA_PARSED_HAIR_COLOR" priority="1" />
    </DestDataItem>
    <DestDataItem name="General_Eye_Color">
      <SrcDataItem name="AAMVA_PARSED_EYE_COLOR" priority="1" />
    </DestDataItem>

  </DataMerging>

    <Script name="FIRST PAGE" startup="True">


        <!-- OCR Codeline Data -->
        <DataHandler name="CODELINE_FORENAME" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

        <DataHandler name="CODELINE_SECOND_NAME" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

        <DataHandler name="CODELINE_SURNAME" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

        <DataHandler name="CODELINE_SEX" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

        <DataHandler name="CODELINE_TAB" storeAs="$data">
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>  

        <DataHandler name="CODELINE_DATE_OF_BIRTH_STR" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

    </Script>

  <Script name="SECOND PAGE">


        <!-- OCR Codeline Data -->
        <DataHandler name="CODELINE_FORENAME" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

        <DataHandler name="CODELINE_SECOND_NAME" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

        <DataHandler name="CODELINE_SURNAME" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

        <DataHandler name="CODELINE_SEX" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

        <DataHandler name="CODELINE_TAB" storeAs="$data">
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>  

        <DataHandler name="CODELINE_DATE_OF_BIRTH_STR" storeAs="$data">
            <Task name="keyb:TypeString" source="$data" />
            <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" />
        </DataHandler>

    </Script>

</OutputWedge>

如何暂停或冻结数据输入。让我们在下面的代码之后说.. <DataHandler name="CODELINE_SEX" storeAs="$data"> <Task name="keyb:TypeString" source="$data" /> <Task name="keyb:PressSpecialKey" key="TAB" ctrl="False" alt="False" shift="False" /> </DataHandler>

4

0 回答 0