LC Server & Server Based Stack?
Bob Sneidar
bobsneidar at iotecdigital.com
Mon Jan 23 10:38:42 EST 2017
If you have a Mac, there is IAC Inter-Application Communication). I am not sure if lcServer can issue Applescript commands, but you CAN create a standalone to listen for Applescript commands, and the IDE runnign on a Mac does this natively.
Bob S
> On Jan 22, 2017, at 11:12 , Rick Harrison via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Hi Mike,
>
> Ok, so the server and my open LC stack are using
> different engines or are different “instances”. If they
> are on the same computer it seems to me that one
> might be able to get the two to talk to each other
> through the computer system’s clipboard in theory.
>
> I haven’t had much luck with getting the contents
> of a variable into the clipboard on the server side
> yet. It keeps throwing weird errors at me.
> Can you think of an easy way to do that?
>
> Thanks,
>
> Rick
>
>> On Jan 21, 2017, at 12:10 PM, Mike Bonner via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> Yeah, thats what I'm saying. Think of it this way. If you make 2
>> standalones, run both, and have 1 standalone try to put text into a field
>> of the other, it won't work because they are each running their own engine
>> instance. If one engine instance opens several stacks they're able to talk
>> because its all through one instance of the engine, and they're all
>> interconnected through the engine.
>>
>> Lc server is an instance, and the standalone, or ide that has your open
>> stack is an instance. So there is no direct connection between the 2. It
>> would be like opening the same text file twice in 2 separate text editors.
>> If you type in 1, the change doesn't appear in the other. You'd have to
>> type in 1, save the changes then reload the text in the other to see the
>> changes that were made.
>>
>> If using a file to update will work, it should be simple enough.. (and not
>> require stacks on the server side.) Have the server write the necessary
>> info, and have an update button on your stack that will grab the new info,
>> or have the stack keep checking for changes every so often, and update as
>> necessary.
>>
>> As far as sockets, chatrev is a pretty awesome example. If you click
>> "resources" in the main toolbar, then select "sample projects" on the lower
>> left, there is an "internet chat" that you can poke around with to get a
>> handle on things.
>>
>> If you decide to go the socket way and the cgi (non lc server) method, i'll
>> be little help. I'm not even sure which versions of the lc engine will
>> work for this, but you said you already looked at jacques page, so are on
>> the right track.
>>
>> I have mentioned it before, but there is the revhttpd stack.. If you don't
>> need multithreading, it would make a great starting base. (and another way
>> to explore sockets too) I love the thing, especially the ability to add
>> commands to the stack that are then callable using a get request of the
>> form cmd=commandtorun
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list