What two programs do you want to communicate?
The first thing you have to figure out when getting applications to "work" together is to determine first, what kind of information can they both use. Not all programs are compatible - even programs that output text may add a little bit of formatting or remove all of the line feeds or whatever. You have to find out first, what kind of information is common between the two programs.
Let's say text (string) information can be used by both. Program one can output a line of text in a file or send it to the clipboard, Program two can do the same. In this startup stage of making the programs share information, I wouldn't use the clipboard for the test. The clipboard is too dynamic for an early stage to see if the programs work together. Clipboard information can be erased and changed too easily to make it a sound test environment this early on.
I would use a file first, because it is less dynamic. You can view the file, rename it and save copies, use it over and over without (hopefully) corruption of the data.
So far in our test scenario we've determined:
1. Both programs can use text information
2. We will attempt to pass information between the two programs using a common file that they can both write (to).
3. ?
For our 3rd step, we know both programs can write a text file, but can they both read one? And how do they do it? Does the text have to be formatted in a certain way?
Now we run a series of output tests for each program. Have the programs output several lines of information and then look at the created file(s) to see if it is what you expected and if the output of one program is compatible with what you know about the other program. If it's not what you expect, rewrite the output for each prgram until it is compatible with the other.
Note: For the two programs to share information, the output of one program doesn't have to be in it's own format, it has to be in a format the OTHER program can understand. If this can't be done, then you have to modify the reading in routine to make the information compatible as it's being read.
So far in our test scenario we've determined:
1. Both programs can use text information
2. We will attempt to pass information between the two programs using a file that they can both write (to).
3. Both programs can read the information that's contained in the file(s)
If you can succesfully pass the information in the file, you should be able to modify the code to pass it via the clipboard.
Before getting one program to control and launch the other, resolve the ability of sharing information. In the case of the file, you can launch one program, create the file, then launch the other one and test the ability to read the file. You can do the same with the clipboard.
With all that said, to send information in DBC to the clipboard:
command$="make a scene"
write to clipboard command$
create a file, save it, then write it to the clipboard:
open to write 1,"c:\directory\filename"
write string 1,"These lines"
write string 1,"Could be string variables"
write string 1,"containing useful information"
write string 1,"for the other program."
close file 1
command$=""
open to read 1,"c:\directory\filename"
while file end() <> 1
read string 1,info$
command$=command$+info$
endwhile
close file 1
write to clipboard command$
If this information is already on the clipboard, you can read through the clipboard by just dumping it into a string variable:
command$=get clipboard$()
As far as comparing the clipboard i don't really understand.
Why do you want to compare them? Is there a value or a change in value that you would want to find?
Enjoy your day.