nicklewe
2nd October 2002, 09:55
Hello,
can anybody help me on the correct use of the clipboard functions.
Specifically:
copy.to.clipboard()
cut.to.clipboard()
paste.to.clipboard()
functions available in the "tgbrgtools" dll.
Do they use the windows clipboard? If not, how can i script contents to the windows clipboard?
in my script i tried to use copy.to.clipboard("x","y"); i'm not getting any results and i am not quite sure what each parameter represents.
thanks for any help,
Nick LeWe
jaapzwaan
2nd October 2002, 10:38
I assume these functions are just wrappers around the following functionality:
You can use the following object functions:
long id
string buf(512)
|open the clipboard:
id = create.object(DsCclipboard, 0)
|write data (can be executed multiple times):
change.object(id, DsNfieldData, buf, len(buf))
| Put text data from the DsCclipboard on the Windows system clipboard
change.object(id,
DsNformat, DSCLIPBOARDTEXT,
DsNaction, DSCLIPBOARDPUT
)
| Cleanup.
destroy.object(id)
Regards,
Jaap Zwaan
nicklewe
2nd October 2002, 14:09
Hi Jaap,
well i've tried it, but the constants are not recognized after compiling.
regards,
Nick
jaapzwaan
2nd October 2002, 15:09
What version are you working on? (DsCclipboard is not available in BaanIV, but the tgbrg function needs this object as well, so I assume you have BaanERP)
Is it a 3GL or 4GL script?
does an include of <bic_object> help?
nicklewe
2nd October 2002, 15:29
Hi again,
well ...
The include makes not difference.
However, the tgbrgtools dll uses
bms.send( ltag & mss, event, BMS.CLIPBOARD, 0 )
??
I have used other createobject commands such as:
gwind = create.object( DsCgwindow, ...
and they work fine
Nick
jaapzwaan
2nd October 2002, 16:13
Nick,
I found something similar in tg (not the exact dll you are refering to). These functions are used as an internal clipboard within baan and are not connected to the windows clipboard.
For writing to the Windows clipboard, you need the DsCclipboard object, which is only available in BaanERP. :(
Regards,
Jaap Zwaan
nicklewe
2nd October 2002, 16:20
ehmm..
that hurts !
ok,
thanks for your help..
Nick