Programmer Guide/Shell Items/DDECONV/SET DDECONV: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
See [[Programmer Guide/Shell Items/DDECONV/DDECONV Item Attributes|DDECONV Item Attributes]] for a list of item attributes. | See [[Programmer Guide/Shell Items/DDECONV/DDECONV Item Attributes|DDECONV Item Attributes]] for a list of item attributes. | ||
The [[Programmer_Guide/Shell_Items/DDECONV|<code>DDECONV</code> shell item]] supports the following <code>SET</code> commands: | |||
<code>SET <var>conv</var> POKE <var>item format data</var | |||
== <code>POKE</code> == | |||
SET <var>conv</var> POKE <var>item format data</var> | |||
Poke the <var>item</var> with <var>data</var> in the specified <var>format</var>. | Poke the <var>item</var> with <var>data</var> in the specified <var>format</var>. | ||
Line 25: | Line 28: | ||
'''Example''' | '''Example''' | ||
Send table myTable to Excel using the previously established conversation myExcelConv. Excel will fill the area r1c1:r10c2 with the first 10 rows (entries) and first 2 columns (fields) of myTable: | Send table <var>myTable</var> to Excel using the previously established conversation <var>myExcelConv</code>. Excel will fill the area r1c1:r10c2 with the first 10 rows (entries) and first 2 columns (fields) of myTable: | ||
SET myExcelConv POKE "r1c1:r10c2" xltable myTable | |||
The full path is necessary for a document topic in Winword (e.g. "C:\Files\Mydocument.doc"). A bookmark (as item) is necessary for inserting text into a word document. | The full path is necessary for a document topic in Winword (e.g. "C:\Files\Mydocument.doc"). A bookmark (as item) is necessary for inserting text into a word document. | ||
Note that the German version of Excel will not understand 'r1c1:r10c2', since rows are called Zeilen and columns are called Spalten; for communication with a German version of Excel, please use 'z1s1:z10s2'. | Note that the German version of Excel will not understand 'r1c1:r10c2', since rows are called ''Zeilen'' and columns are called ''Spalten''; for communication with a German version of Excel, please use 'z1s1:z10s2'. | ||
<code | == <code>REQUEST</code> == | ||
SET <var>conv</var> REQUEST <var>item format data</var> [<var>timeout</var>] | |||
{| | Request the <var>data</var> from <var>item</var>. The macro waits up to <var>timeout</var> milliseconds for the server to return the <var>data</var>. | ||
{| class="einrahmen" | |||
|- | |- | ||
|conv | |conv | ||
Line 47: | Line 51: | ||
|- | |- | ||
|format | |format | ||
|the format or data | |the format or data-type of <var>data</var>. Can be one of the following: | ||
{| class="keinrahmen" | |||
|- | |- | ||
|<code>TEXT</code> | |<code>TEXT</code> | ||
Line 56: | Line 61: | ||
|- | |- | ||
|<code>CSV</code> | |<code>CSV</code> | ||
|a table item of comma | |a table item of comma-separated values | ||
|- | |- | ||
|<code>UNICODETEXT</code> | |<code>UNICODETEXT</code> | ||
|a unicode string | |a unicode string | ||
|} | |} | ||
|- | |- | ||
|data | | data | ||
|the data variable. This is either a string for formats <code>TEXT</code> and <code>UNICODETEXT</code>, or a table for formats <code>XLTABLE</code> or <code>CSV</code>. | | the data variable. This is either a string for formats <code>TEXT</code> and <code>UNICODETEXT</code>, or a table for formats <code>XLTABLE</code> or <code>CSV</code>. | ||
|- | |- | ||
|timeout | | timeout | ||
|number of milliseconds we should wait for server to return before we fail | | number of milliseconds we should wait for server to return before we fail | ||
|} | |} | ||
== | == <code>ADVISE</code> == | ||
SET conv ADVISE <var>item format</var> [<var>data</var>] /Hot|Warm | |||
Initiate an advise loop. The <code>[[Programmer Guide/Shell Items/DDECONV/DDECONV messages|ADVISE]]</code> message will be sent when the item's data changes. If a link is hot (/Hot) the server notifies the client whenever the requested data changes and immediately sends the new data to the client ({{STX}}). For a hot link, the value item <var>data</var> is necessary (because <var>data</var> is automatically updated). If the link is warm (/Warm) the server notifies the client whenever the requested data changes but sends the new data only after an explicit request from the client. To request the data command '<code>SET conv REQUEST</code>' is used. | Initiate an advise loop. The <code>[[Programmer Guide/Shell Items/DDECONV/DDECONV messages|ADVISE]]</code> message will be sent when the item's data changes. If a link is hot (/Hot) the server notifies the client whenever the requested data changes and immediately sends the new data to the client ({{STX}}). For a hot link, the value item <var>data</var> is necessary (because <var>data</var> is automatically updated). If the link is warm (/Warm) the server notifies the client whenever the requested data changes but sends the new data only after an explicit request from the client. To request the data command '<code>SET conv REQUEST</code>' is used. | ||
{| | {| class="einrahmen" | ||
|- | |- | ||
|<var>conv</var> | |<var>conv</var> | ||
Line 89: | Line 92: | ||
|- | |- | ||
|format | |format | ||
|the format of data | |the format of data-type of <var>data</var> | ||
|} | |} | ||
<code>SET <var>conv</var> STOPADVISE [<var>item</var>] | == <code>STOPADVISE</code> == | ||
SET <var>conv</var> STOPADVISE [<var>item</var>] | |||
Stop an advise loop. If <var>item</var> is not specified, all advise loops for this conversation are stopped. | Stop an advise loop. If <var>item</var> is not specified, all advise loops for this conversation are stopped. | ||
Line 105: | Line 110: | ||
|} | |} | ||
== | == <code>EXECUTE</code> | ||
SET conv EXECUTE <var>command</var> | |||
Execute the <var>command</var>. | Execute the <var>command</var>. |
Revision as of 13:22, 31 October 2012
See DDECONV Item Attributes for a list of item attributes.
The DDECONV
shell item supports the following SET
commands:
Contents
POKE
SET conv POKE item format data
Poke the item with data in the specified format.
conv | the established conversation |
item | the item you wish to poke data to |
format | the format or data-type of data (see conv[!SERVICEFORMATS] for the formats supported by the conversation's server and 'SET conv REQUEST ' for the formats supported by STx)
|
data | the data you want to poke (a string variable or a shell-table) |
Example
Send table myTable to Excel using the previously established conversation myExcelConv. Excel will fill the area r1c1:r10c2 with the first 10 rows (entries) and first 2 columns (fields) of myTable:
SET myExcelConv POKE "r1c1:r10c2" xltable myTable
The full path is necessary for a document topic in Winword (e.g. "C:\Files\Mydocument.doc"). A bookmark (as item) is necessary for inserting text into a word document.
Note that the German version of Excel will not understand 'r1c1:r10c2', since rows are called Zeilen and columns are called Spalten; for communication with a German version of Excel, please use 'z1s1:z10s2'.
REQUEST
SET conv REQUEST item format data [timeout]
Request the data from item. The macro waits up to timeout milliseconds for the server to return the data.
conv | the established conversation | ||||||||
item | the item you wish to get data for | ||||||||
format | the format or data-type of data. Can be one of the following:
| ||||||||
data | the data variable. This is either a string for formats TEXT and UNICODETEXT , or a table for formats XLTABLE or CSV .
| ||||||||
timeout | number of milliseconds we should wait for server to return before we fail |
ADVISE
SET conv ADVISE item format [data] /Hot|Warm
Initiate an advise loop. The ADVISE
message will be sent when the item's data changes. If a link is hot (/Hot) the server notifies the client whenever the requested data changes and immediately sends the new data to the client (STx). For a hot link, the value item data is necessary (because data is automatically updated). If the link is warm (/Warm) the server notifies the client whenever the requested data changes but sends the new data only after an explicit request from the client. To request the data command 'SET conv REQUEST
' is used.
conv | the conversation |
item | the item with the data |
data | the data variable |
format | the format of data-type of data |
STOPADVISE
SET conv STOPADVISE [item]
Stop an advise loop. If item is not specified, all advise loops for this conversation are stopped.
conv | the conversation |
item | the item with the data |
== EXECUTE
SET conv EXECUTE command
Execute the command.
conv | the conversation |
command | the command string to execute |