Sending CTRL-V from Natural

Natural Version 6.3.12 for windows xp

I need send from natural statement programming the “CTRL-V” keyboard combination key.

Somebody have any idea, thank´s.

Can you please explain in a bit more detail where you want to paste to with a simulated Ctrl+V ?

And where does the clipboard data come from ?

Do you want to “copy & paste” output from a Natural program?

This is somewhat difficult since on the mainframe the output is text whereas on the PC, the output is bit encoded.

Not to worry, the %C command, issued via a SET CONTROL ‘C’ statement, will copy the output to the editor area and, in so doing, convert it to text. From there, you can select whatever you need for pasting somewhere else (for example, a word document).

steve

Thanks Wolfgang and Steve,

The scenary we would like to perform is, copying data from an Excel sheet with several rows and cols, and paying it to a table control in Natural. This works very fine when we use CTRL+V short Key, paying every value in a cell in correspondence with the original spreadsheet in Excel. However if we use, the context menu of the table control in Natural and then we invoke the “paste” action from the menu, it only pastes the first value in the first cell in the table.

How we can do to perform this same CTRL+V action but with code. Because we want to avoid errors from users when they are going to paste.

Please, let me know any doubt. Thanks in avance.

Hi Alejandro
You mention in the first post that it is natural in win XP.
If that is also the env. for the end-users, you could perhaps go directly for the excel file instead of using copy/paste ?

There is a previous posting regarding how to interact with excel here:
http://tech.forums.softwareag.com/techjforum/posts/list/7139.page

Still assuming your runtime env. is windows; an alternative way would be to make a natural Dialog where you can use controls that are more suited for pasting than standard map-fields.

Finn

You can use the API ‘USR1039N’ which has several clipboard options incl. paste.