NIPO ODIN Version 5.17
*RUN
System
NIPO CATI and NIPO CAPI only
Purpose
Runs an external Windows module (.DLL ) within the NIPO CATI Client and NIPO CAPI Client.
Syntax
*RUN Qn "[LIBRARY],[FUNCTION]"
Description
The *RUN command executes a function within an external library. The library must have been specifically developed to work in conjunction with the NIPO ODIN engine, and must be accessible for the NIPO CATI Client and NIPO CAPI Client executable in a relative path. The library may access variables defined within the NIPO ODIN script and return information in the specified question. It may also return data in NIPO ODIN variables.
For more information on creating your own libraries, contact the NIPO Software Helpdesk for example source.
Arguments
Qn The target question where the result value from the library function call is stored. If the data field of the target question is not long enough, the incoming data is truncated.
LIBRARY The partial or full file path and name of the library to call.
FUNCTION The name of the function within the library to call. Note that the function name is case-sensitive.
STDRUN32
As part of its interviewing client software NIPO Software includes the library STDRUN32.DLL . This library contains a single function STDRUNENTRY which allows the NIPO ODIN script to call an external executable and pass information to the executable using the clipboard or a file. The following variables may be defined in NIPO ODIN script to be used by STDRUN32.DLL :
CMDLINE Text variable. Full or partial path to the application that needs to be called.
INPUTDATA The library STDRUN32.DLL uses the text variable INPUTDATA to transfer information to the external application. The value of INPUTDATA is copied to the clipboard prior to calling the application. Note that the application that is called needs to be able to handle information passed to the clipboard.
STDRUNTEMPFILEPATH If you do not wish to use the clipboard to pass information to the executable, STDRUN32.DLL may use a file instead. This text variable sets a partial or full file path towards a file in which to store the contents of INPUTDATA . Any information passed to INPUTDATA is placed in this file as a null-terminated string. Note that the executable that is called will have to take care of opening, reading and optionally changing the information in this file. Any changed information is ultimately passed to the target question using this file. When using STDRUNTEMPFILEPATH it is recommended to set RUNTYPE to -1 (see below) to avoid file access issues.
RUNTYPE Numeric variable. Sets whether or not STDRUN32.DLL waits for the external application to finish before NIPO ODIN continues the interview.
Runtype values
Value
|
Function
|
0 / 10
|
Wait for application that was opened to close before continuing the NIPO ODIN script. Use 0 for 16-bit applications and 10 for 32-bit applications.
|
1 / 11
|
Do not wait for application to finish – continue the questionnaire immediately. Use 1 for 16-bit applications and 11 for 32-bit applications.
|
-1
|
Wait for the application, and for any other application that was started by the application in turn, to finish before continuing the NIPO ODIN script.
|
STDRUN32 Example #1
Example of using STDRUN32.DLL using the clipboard. Return information, if any, is stored in Q1.
*TEXTVARS CMDLINE, INPUTDATA *VARS RUNTYPE
*PUT CMDLINE "MYOWN.EXE" *PUT RUNTYPE [ -1 ] *PUT INPUTDATA "mydata"
*QUESTION 1 *ALPHA L10 *RUN Q1 "STDRUN32.DLL,STDRUNENTRY"
STDRUN32 Example #2
Example of using STDRUN32.DLL using an external file. Return information, if any, is stored in Q1.
*TEXTVARS CMDLINE, INPUTDATA, STDRUNTEMPFILEPATH *VARS RUNTYPE
*PUT CMDLINE "MYOWN.EXE" *PUT STDRUNTEMPFILEPATH "TEMP.TXT" *PUT RUNTYPE [ -1 ] *PUT INPUTDATA "mydata"
*QUESTION 1 *ALPHA L10 *RUN Q1 "STDRUN32.DLL,STDRUNENTRY"
|