WWPoke() Function
- Last UpdatedNov 05, 2021
- 2 minute read
Writes data to an item of an application. You can use it, for example, to write the value into a spreadsheet cell in Excel.
Important: The WWPoke() function does not work on 64-bit versions of the Windows operating system.
Syntax
result = WWPoke (appname, topic, item, string)
Parameters
appname
The name of the application. A literal string value, message tagname, or string expression.
topic
The name of the topic within the application. A literal string value, message tagname, or string expression.
item
The item name belonging to the topic and application. A literal string value, message tagname, or string expression.
string
The value to be written. A literal string value, message tagname, or string expression. You can use the StringFromIntg(), StringFromReal() or Text() functions to convert the value of an integer or real tagname to a message tagname.
Return Value
A value of-1, 0, or 1 indicating the following:
-1 - data not written successfully. Possible causes are the application not running or the topic or item do not exist.
0 - data not written successfully because the application is busy.
1 - data written successfully.
Remarks
Do not use the WWPoke() or WWRequest() function to read and write data between InTouch applications on different nodes or sessions. To read and write data between InTouch applications, use Access Names instead. See Set up access names.
Example(s)
This script puts the value of the real tagname CellValue in the message tagname Mtag and writes the value to the spreadsheet cell Row 1, Column 1 of sheet Sheet1 in Microsoft Excel book Book1.xls.
MTag = Text(CellValue,"0");
Result = WWPoke("excel","[Book1.xls]sheet1", "r1c1",Mtag);