Open Process, Read Process and Write Process

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 246
Joined: Tue Jun 30, 2009 11:15 pm

Open Process, Read Process and Write Process

Post by SirWobbyTheFirst » Wed Mar 10, 2010 1:19 am

Hi everyone.

I was wondering how I could make use of the Read From Process and Write To Process commands in order to make two Revolution applications talk to each other. I have considered using sockets however that is subject to the firewall and Windows Firewall is being awefully quiet lately. :?

So my question is how could I construct my second application to read what the first one writes to it and then be able to send data back to the first one and vice versa for the first application?

All help is much appreciated. Thanks.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Open Process, Read Process and Write Process

Post by FourthWorld » Wed Mar 10, 2010 4:23 am

Rather than read/write to process, you might consider using sockets. See the open socket, accept, write to socket, and read from socket commands in the RevTalk Dictionary.

You might also find it helpful to play with the Chat example stacks included with Rev, as they make good use of socket communications.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 246
Joined: Tue Jun 30, 2009 11:15 pm

Re: Open Process, Read Process and Write Process

Post by SirWobbyTheFirst » Wed Mar 10, 2010 6:07 pm

Hi FourthWorld, I have tried sockets however I have found that sometimes they can end up being blocked without the Firewall notifying me and I was just wondering if it might be possible to use Read/Write Process because my software only utilises local communication, the server allows remote management and I have setup sockets for that. But the reason i wanted to use Read/Write process was because the only time my application will need it is when my shutdown handler needs to request the second process to save its work and shutdown.

I hope this helps. Sorry if i seem a bit pesky as well. :roll:

Post Reply