LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
bjb007
- Posts: 313
- Joined: Fri Dec 28, 2007 4:56 am
Post
by bjb007 » Tue Jul 08, 2008 1:38 am
I would like the user to be able to send the
clicks to other Rev programmes from this...
Are there any niftier ways than writing to
a file then having the other prog. read from
there? Just needs the number on the button.
Life is just a bowl of cherries.
-
Janschenkel
- VIP Livecode Opensource Backer

- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
-
Contact:
Post
by Janschenkel » Tue Jul 08, 2008 5:23 am
One option is read/writing a shard file, as you mentioned. Another option is socket communication, where you setup a server application that gets the message, handles it and maybe send a result back to the client application.
Are you developing both applications?
Jan Schenkel.
-
bjb007
- Posts: 313
- Joined: Fri Dec 28, 2007 4:56 am
Post
by bjb007 » Tue Jul 08, 2008 5:45 am
Jan
I'd like to connect to a number of
apps which I have written.
When you mention "server" I expect
you mean the one on the users computer?
Don't know much about them except
"128.0.0.1" (I think).
Life is just a bowl of cherries.
-
Garrett
- Posts: 386
- Joined: Sat Apr 08, 2006 8:15 am
-
Contact:
Post
by Garrett » Tue Jul 08, 2008 9:05 am
Rev isn't capable of sending keystrokes to other applications, regardless if they're rev apps you made or not.
So tcp/ip communications is probably the best option.
-
bjb007
- Posts: 313
- Joined: Fri Dec 28, 2007 4:56 am
Post
by bjb007 » Tue Jul 08, 2008 9:16 am
Garrett
Just has to send the number on the
button and have the receiving prog
do a "mouseUp" with it.
Life is just a bowl of cherries.
-
Janschenkel
- VIP Livecode Opensource Backer

- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
-
Contact:
Post
by Janschenkel » Tue Jul 08, 2008 12:51 pm
In RevOnline there is a pair of example stacks for TCP/IP communicaztion that you can take apart and learn from.
RevOnline > User Spaces > Browse by category > Programming : TCP App 1 and 2
Hope this helped,
Jan Schenkel.
-
bjb007
- Posts: 313
- Joined: Fri Dec 28, 2007 4:56 am
Post
by bjb007 » Tue Jul 08, 2008 3:15 pm
Thanks Jan. Seems to be just
the thing.
I guess then that the receiving prog.
uses "read from socket"?
And to send info to more than one prog
I'd need a list and send to them in
rotation?
Is there a way to detect which progs are
running?
Life is just a bowl of cherries.
-
Janschenkel
- VIP Livecode Opensource Backer

- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
-
Contact:
Post
by Janschenkel » Tue Jul 08, 2008 7:35 pm
That could be done through 'shell' function calls to check the running processes, but this approach would be quite platform-specific.
It may be a lot easier to just write a file in a shared directory, with a preset extension, which contains the name of the application and the port on which you can contact it.
And even then, you should check the socketTimeOut options, just in case your other application closed without cleaning up its reference file. Also take a look at the 'specialFolderPath' function to determine a good spot to write those files.
Hope this helped,
Jan Schenkel.