[SOLVED] How to copy value of uniface field to windows clipboard via proc code | Uniface Development | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

—  Results per page  —








— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters
For a group of consecutive words like 'end of support' use Match phrase

sp_Feed Topic RSS sp_TopicIcon
[SOLVED] How to copy value of uniface field to windows clipboard via proc code
26 Nov 2014
2:38 am
Avatar
Fabs
New Member
Forum Posts: 2
Member Since:
26 Nov 2014
sp_UserOfflineSmall Offline

I would like to know how to copy value of uniface field  to windows clipboard via proc code so that the value is available to be pasted to other windows application eg word, excel, notepad etc 

Thank you

26 Nov 2014
8:59 am
Avatar
ulrich-merkel
Frankfurt/Germany
Member
Forum Posts: 1890
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

   macro “^SELECT^TEXT^SAVE” ; saves text in clipboard, only in UNIFIELD

26 Nov 2014
3:50 pm
Avatar
gianni
Member
Forum Posts: 357
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

ulrich-merkel said
   macro “^SELECT^TEXT^SAVE” ; saves text in clipboard, only in UNIFIELD

Hi Fariba,

Uli is right …and it is working also on EditBoxes (just checked on U9.6.05.X505)!

but…remember the macro instruction is by default ending the current module so if you have a button to execute the action your script in the detail trigger should be something like:

$prompt = fieldToCopy
call myCopyToClipboard
message/info “Now you can paste it to MS-Word!”
return(0)

entry myCopyToClipboard
macro “^SELECT^TEXT^SAVE”
end

If you put the macro instruction directly in the main code of <Detail> trigger you are not seeing the dialog coming from message/info…neither any following instructions coded!

Hope it help you!
Gianni

27 Nov 2014
10:14 am
Avatar
ulrich-merkel
Frankfurt/Germany
Member
Forum Posts: 1890
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi Fariba,

 

The macro solution suffers that it needs an active Structure Editor to be processed.

Therefore, the message/info in giannis example comes too early.

 

I encapsulated the complete code in a separate form (so long ago that I used $result and run to get the show rolling)

 

Because you are very experienced in uniface technical support, you may want a 3GL solution as an alternative?

http://www.codeproject.com/Art…..nt-utility

is a c++ code which can be used to build a uniface dll.

02 Dec 2014
3:06 am
Avatar
Fabs
New Member
Forum Posts: 2
Member Since:
26 Nov 2014
sp_UserOfflineSmall Offline

Thank you All 

08 Jul 2018
5:10 pm
Avatar
LG1949
Member
Forum Posts: 17
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi all,

From a popup menu is executed a form that processes some information related to some words present in a field of the previous form.

I wanted to transfer to the called form selected words in the previous one but it seems that the selection macro “^SELECT^TEXT^SAVE” (corresponding to the command CTRL-C) is not working while the “^INS_SELECT” (ie CTRL-V) works well .
I tried with fields of type Unifield and EditBox and several other combinations of macro commands but without success.

Problem not very important because my customer, being provided with both hands, can use them to type CTRL-C without excessive physical effort (even one hand is sufficient).

It’s just a matter of disappointed professional pride.

Luigi

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 131

Currently Online:
31 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ulrich-merkel: 1890

Iain Sharp: 680

Theo Neeskens: 371

gianni: 357

Adrian Gosbell: 318

istiller: 299

rogerw: 272

Knut: 229

lalitpct: 197

Arjen van Vliet: 184

Member Stats:

Guest Posters: 3

Members: 10982

Moderators: 0

Admins: 6

Forum Stats:

Groups: 1

Forums: 62

Topics: 2323

Posts: 10052

Newest Members:

greentipodent1976, NicolasHib, gipipufen1981, Alfredvax, Lesterpioto, crystalst3, otogsa12, Ramonmaw, harolddz1, Lariskawo

Administrators: admin: 23, diseli: 1045, Nico Peereboom: 84, richiet: 406, Mike Taylor: 38, JanCees: 39