Programmer Guide/Shell Items/DDECONV/SET DDECONV: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{DDECONV Item}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
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|<code>DDECONV</code> 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:
The [[Programmer_Guide/Shell_Items/DDECONV|<code>DDECONV</code> shell item]] supports the following <code>SET</code> commands:
Line 6: Line 7:
== <code>POKE</code> ==
== <code>POKE</code> ==


  SET <var>conv</var> POKE <var>item format data</var>
  SET <var>conv</var> POKE <var>item</var> <var>format</var> <var>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>.


{|
{| class="einrahmen"
|-
|-
|conv
|<var>conv</var>
|the established conversation
|the established conversation
|-
|-
|item
|<var>item</var>
|the item you wish to poke data to
|the item you wish to poke data to
|-
|-
|format
|<var>format</var>
|the format or data<nowiki>-</nowiki>type of <var>data</var> (see <code>conv[!SERVICEFORMATS]</code> for the formats supported by the conversation's server and '<code>SET conv REQUEST</code>' for the formats supported by {{STX}})
|the format or data-type of <var>data</var> (see <code>conv[!SERVICEFORMATS]</code> for the formats supported by the conversation's server and '<code>SET conv REQUEST</code>' for the formats supported by {{STX}})
|-
|-
|data
|<var>data</var>
|the data you want to poke (a string variable or a shell<nowiki>-</nowiki>table)
|the data you want to poke (a string variable or a shell<nowiki>-</nowiki>table)
|}
|}
Line 27: Line 28:
'''Example'''
'''Example'''


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:
Send table <var>myTable</var> to Excel using the previously established conversation <var>myExcelConv</var>. 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
  SET myExcelConv POKE "r1c1:r10c2" xltable myTable
Line 37: Line 38:
== <code>REQUEST</code> ==
== <code>REQUEST</code> ==


  SET <var>conv</var> REQUEST <var>item format data</var> [<var>timeout</var>]
  SET <var>conv</var> REQUEST <var>item</var> <var>format</var> <var>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>.
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>.
Line 43: Line 44:
{| class="einrahmen"
{| class="einrahmen"
|-
|-
|conv
|<var>conv</var>
|the established conversation
|the established conversation
|-
|-
|item
|<var>item</var>
|the item you wish to get data for
|the item you wish to get data for
|-
|-
|format
|<var>format</var>
|the format or data-type of <var>data</var>. Can be one of the following:
|the format or data-type of <var>data</var>. Can be one of the following:
{| class="keinrahmen"
{| class="keinrahmen"
Line 75: Line 76:
== <code>ADVISE</code> ==
== <code>ADVISE</code> ==


  SET conv ADVISE <var>item format</var> [<var>data</var>] /Hot|Warm
  SET conv ADVISE <var>item</var> <var>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.
Line 84: Line 85:
|the conversation
|the conversation
|-
|-
|item
|<var>item</var>
|the item with the data
|the item with the data
|-
|-
|data
|<var>data</var>
|the data variable
|the data variable
|-
|-
|format
|<var>format</var>
|the format of data-type of <var>data</var>
|the format of data-type of <var>data</var>
|}
|}
Line 100: Line 101:
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.


{|
{| class="einrahmen"
|-
|-
|conv
|<var>conv</var>
|the conversation
|the conversation
|-
|-
|item
|<var>item</var>
|the item with the data
|the item with the data
|}
|}


== <code>EXECUTE</code>
== <code>EXECUTE</code> ==


  SET conv EXECUTE <var>command</var>
  SET <var>conv</var> EXECUTE <var>command</var>


Execute the <var>command</var>.
Execute the <var>command</var>.
Line 120: Line 121:
|the conversation
|the conversation
|-
|-
|command
|<var>command</var>
|the command string to execute
|the command string to execute
|}
|}

Latest revision as of 08:34, 10 April 2015

DDECONV Item
NEW SET ATTRIBUTES MESSAGES

See DDECONV Item Attributes for a list of item attributes.

The DDECONV shell item supports the following SET commands:

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:
TEXT a string
XLTABLE use the Excel table format for the transfer
CSV a table item of comma-separated values
UNICODETEXT a unicode string
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

Navigation menu

Personal tools