|
Post by angelo2449 on Sept 19, 2021 13:35:12 GMT -5
Hello guis,
I have written many programs in> Autolisp < augmented with > Liberty Basic <.
For the exchange of variables between the two languages, before I used the hard disk now, I use the Windows clipboard.
This technique is very effective but sometimes creates problems.
In fact, I have to continually commit the Wndows clipboard that I would like to use in another way.
Does anyone know of another technique for exchanging data between Liberty Basic and another language?
Thanks
|
|
|
Post by Brandon Parker on Sept 19, 2021 14:10:32 GMT -5
There are several ways in which you might go about this. You could use WM_COPYDATA and the WMLiberty.dll or you could pass data using Environment Variables. Both are fairly straightforward to implement.
{:0)
Brandon Parker
|
|
|
Post by angelo2449 on Sept 20, 2021 2:14:43 GMT -5
Thanks Brandon, I looked for information on the web for what you wrote to me but I found confusing news. Using your experience, could you help me in this example?
I save, with Autolisp, in the Windows clipboard, these data: "Data1#Data#Data3"
Then I read them in Liberty Basic
Basically, I do this, from Autolisp : (setClipText "Data1#Data#Data3")
Then I read them in Liberty Basic like this: #ext.edit, "!cls" #ext.edit, "!paste" #ext.edit, "!selectall" #ext.edit, "!selection? Stringa$"
How do I translate this operation with the method you recommend? Thanks.
|
|
|
Post by tenochtitlanuk on Sept 20, 2021 9:28:50 GMT -5
I've used saving file contents to ramdisk for similar purposes in the past, usually between LB programs. This thread made me realise I'd never used saving to Windows clipboard before. This copies LB output to Windows clipboard.
nomainwin
open "Test" for text as #tWin
#tWin, "!trapclose [quit]"
#tWin "Hello World" +chr$( 13) +" Bye World!"
#tWin "!selectall" #tWin "!copy contents"
wait
[quit] close #tWin end
The opposite way, to copy from Windows clipboard to LB you'd use
#tWin "!paste"
|
|