Connecting 2 stand alone programs.

Jim Ault JimAultWins at yahoo.com
Mon Aug 21 12:24:24 EDT 2006


> You can only share information with an external .txt file between 2 apps
> or if you are sure there is no interference, with the clipboard data
> Yves COPPE

You cold try the shell() commands as another option, or you could use UDP or
TCP, which means the apps talk (send message packets) directly to each
other.  Currently I use UDP for this, since the my grand scheme includes
substantial communication by apps between computers.
--------------
appOne
open datagram socket to "127.0.0.1:4567"
write varToBeSent to socket "127.0.0.1:4567"
close socket "127.0.0.1:4567"
------------
appTwo
on openstack
accept datagram socket on 4567 with message "gotPacketFrAppOne"


on gotPacketFrAppOne pHost, pMsg, pSocket
   answer "Received from "& pHost
   answer "on socket " & pSocket
   answer "with the following text "&cr & pMsg
end gotPacketFrAppOne

--this can be a two-way
--UDP packets can only be about 8k max
--one advantage is the the receipt of a UDP packet will trigger the handler
to action
--text files are good, but the receiving app needs a way to know to read
them
--Rev can easily send/receive 10 packets per second (actually more)
--the docs give details and Alex Tweedly's example stacks work on  the same
computer (available at RevOnline, user spaces, alextweedly)

Just another option.

Jim Ault
Las Vegas

On 8/21/06 8:05 AM, "Yves COPPE" <yvescoppe at skynet.be> wrote:

> 
> Le 21 août 06 à 15:37, Klaus Major a écrit :
> 
>> Hi Alvaro,
>> 
>>> Excellent Klaus.. is very good for me!!
>> 
>> so it works for you?
>> Good :-)
>> 
>>> And if I need to use global variables between applications .exe, I
>>> will use
>>> this kind of variables? Or I need to use external files .txt in
>>> order to
>>> remember values?
>> 
> 
> 
> You can only share information with an external .txt file between 2 apps
> or if you are sure there is no interference, with the clipboard data
> 
> Greetings.
> 
> Yves COPPE
> yvescoppe at skynet.be
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list