[SOLVED] How to copy value of uniface field to windows clipboard via proc code

Author: fariba.afroukhteh@uniface.com (Fabs)

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

5 Comments

  1.    macro "^SELECT^TEXT^SAVE" ; saves text in clipboard, only in UNIFIELD


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. 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


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  3. 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/Articles/6842/SmartClip-A-Clipboard-enhancement-utility is a c++ code which can be used to build a uniface dll.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. Thank you All 


    Author: Fabs (fariba.afroukhteh@uniface.com)
  5. 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


    Author: LG1949 (l_giuliante@shsistemi.it)