Highlighted
New Member.
876 views

Get info from the clipboard

Jump to solution

Hello all,

can anyone help me with this?

I need to get the info from the clipboard.

I found some info on this forum about CLIPACU.DLL which could do the trick, but I cannot find it anywhere (before it was located on the AcuCorp sample directory)

The purpose I need it for is the get the info from the clipboard and being able to put it in a grid by a simple Ctrl-V command. Maybe someone has an other solution for this.

Thanks in advance,

Ruud

0 Likes
1 Solution

Accepted Solutions
Highlighted
New Member.

RE: Get info from the clipboard

Jump to solution
Thank you, found it

View solution in original post

0 Likes
8 Replies
Highlighted
Absent Member.
Absent Member.

RE: Get info from the clipboard

Jump to solution
Google CLIPBOARD.DLL
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Get info from the clipboard

Jump to solution
clipacu.zip can be found here:
supportline.microfocus.com/.../GUIsampleprograms.aspx

There is also the Windows API DLL 'user32.dll' - www.microfocus.com/.../BKITITWINDS019.html
---
Martin Turner
Product Support Engineer
Micro Focus
0 Likes
Highlighted
New Member.

RE: Get info from the clipboard

Jump to solution
Thank you, found it

View solution in original post

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Get info from the clipboard

Jump to solution
There is an easy way to implement standard Windows Edit keys in an AcuCOBOL-GT program. All that is required is to add the following lines at the beginning of the program (see note below):

set environment "KEYSTROKE" to "exception=2001 ^x".
set environment "KEYSTROKE" to "exception=2002 ^c".
set environment "KEYSTROKE" to "exception=2003 ^v".
set environment "KEYSTROKE" to "exception=2004 ^z".
set environment "KEYSTROKE" to "exception=2005 ^a".
Set exception value 2001 to cut-selection.
Set exception value 2002 to copy-selection.
Set exception value 2003 to paste-selection.
Set exception value 2004 to undo.
Set exception value 2005 to select-all-selection.

NOTE: The above example uses exception values 2001 through 2005. The programmer must pick exception values that are not already being used in the program.
0 Likes
Highlighted
New Member.

RE: Get info from the clipboard

Jump to solution
Hi Doug, thank you for your reply. Does this also work within a grid or just for entry fields?
0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Get info from the clipboard

Jump to solution
Yes, it works in grids.
0 Likes
Highlighted
New Member.

RE: Get info from the clipboard

Jump to solution
Hi Doug, I tried this in the grid, but it only works when you're in entry mode.
It doesn't generate a msg-begin-entry event.
What I'm trying to achieve is that when a user presses Ctrl-V on a grid cell, to put the contents from the clipboard in that cell and that is not what I can do with the exception value as you described, but maybe I'm doing something wrong.
Do you have a small example of how it might be done?
0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Get info from the clipboard

Jump to solution
Yes, that's how it works. The grid cell must be in entry mode in order to paste with CTRL-V. Pressing Enter will put it in entry mode, then do CTRL-V.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.