Re: LC Server & Server Based Stack?

2017-01-23 Thread Rick Harrison via use-livecode
Hi Bob, The LC Dictionary shows AppleScript commands are for the desktop only - so probably lcServer can’t do it. If there is anyone on the list who has had success having lcServer send AppleScript commands please feel free to chime in! Thanks, Rick > On Jan 23, 2017, at 10:38 AM, Bob

Re: LC Server & Server Based Stack?

2017-01-23 Thread Bob Sneidar via use-livecode
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

Re: LC Server & Server Based Stack?

2017-01-23 Thread Bob Sneidar via use-livecode
That is becase the parent process for both stacks is the IDE. In a web browser, as previously mentioned, each time lcServer runs a script it is a new process. Bob S On Jan 21, 2017, at 07:47 , Rick Harrison via use-livecode >

Re: LC Server & Server Based Stack?

2017-01-22 Thread Rick Harrison via use-livecode
I really wish the copy to clipboard thing would have worked because it would have been a very simple solution for a personal application I wanted to work on for myself. I will endeavor to learn about sockets etc. even though that is more of a learning curve here. I would rather have found

Re: LC Server & Server Based Stack?

2017-01-22 Thread Mike Bonner via use-livecode
What richard said. Instead of the clipboard (which I suspect doesn't work because the lc server engine is not running in the same shell instance) The idea of using a file as an intermediary storage container would work, but sockets would be so much better. (Since this will be same machine

Re: LC Server & Server Based Stack?

2017-01-22 Thread Richard Gaskin via use-livecode
Rick Harrison wrote: > 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

Re: LC Server & Server Based Stack?

2017-01-22 Thread Rick Harrison via use-livecode
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

Re: LC Server & Server Based Stack?

2017-01-21 Thread Mike Bonner via use-livecode
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

Re: LC Server & Server Based Stack?

2017-01-21 Thread Rick Harrison via use-livecode
Hi Mike, This seems a little crazy to me. I can have two stacks open in memory in LiveCode, and I can send a message such as “mouseUp” from one stack to a button in the other stack. The button in the other stack outputs some messages to the message box and puts a message in a field on that

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
You can modify a stack using lc server, and save it, but that won't update an already open stack in memory. And if you don't add code to save the stack from lc server, even if you do reload the stack, the change won't be there. One way to update a field in an open stack would be to have the

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Mike, Sorry I was out for dinner.. > How do you know it didn't work? I know it didn’t work because I looked at the stack and no changes had occurred in the stack. (As in nothing new was put into the field.) I’m not looking for the change to occur in the browser, that’s not where I’m

Re: LC Server & Server Based Stack?

2017-01-20 Thread J. Landman Gay via use-livecode
On 1/20/17 6:00 PM, Rick Harrison via use-livecode wrote: My next line of code I tried was: put "I hope this worked!" into field "TestFirstNameField1" of card 1 of this stack It didn’t put anything into that field. When you are working on a server, you can only see what gets put into the

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
think I may have figured out what you're wanting to do.. Correct me if I'm wrong. YOu want to have an active process with an open stack that is running, either in the ide or as a standalone. And to then be able to hit a web page that then updates the currently open stack. If thats the case, its

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
just checked, "this stack" should work fine (unless you do something that changes the context) On Fri, Jan 20, 2017 at 5:27 PM, Mike Bonner wrote: > How do you know it didn't work? > Well ok.. first.. On the server you have to make sure that the stack you > are on is the one

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
How do you know it didn't work? Well ok.. first.. On the server you have to make sure that the stack you are on is the one you think you're on. If you put the name of "this stack" you can see where you are when it happens. Second, the server first loads the stack. Then if you "put" something into

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Mike, Ok, the put message in the stack showed up in my browser so that worked fine. My next line of code I tried was: put "I hope this worked!" into field "TestFirstNameField1" of card 1 of this stack It didn’t put anything into that field. I also put the same code into a button on the

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
The quotes were funky in this like..answer "This is the script in the teststack" (I think thats where I fixed it) On Fri, Jan 20, 2017 at 4:07 PM, Mike Bonner wrote: > I noticed something in the code you posted before. Messed up quotes in > the stack script code. I

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
I noticed something in the code you posted before. Messed up quotes in the stack script code. I fixed those at the same time but had assumed they were just a typo. Maybe not? On Fri, Jan 20, 2017 at 4:05 PM, Rick Harrison via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Mike, > >

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Mike, Sorry, I didn’t see this until I had already sent my last message. LOL Yes, I see that things work on your end. I’ll try it again. Thanks, Rick > On Jan 20, 2017, at 5:58 PM, Mike Bonner via use-livecode > wrote: > >

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Mike, I had tried “put” before I tried “answer” and it hadn’t worked which was why I tried “answer”. Did you test your new code before posting this to me? Thanks, Rick > On Jan 20, 2017, at 5:57 PM, Mike Bonner via use-livecode > wrote: > > go stack

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
http://guidezone.info/stackuse.lc -- same link to see the updated example. On Fri, Jan 20, 2017 at 3:57 PM, Mike Bonner wrote: > I changed the script of the stack to match, but changed answer to put. > The script of the lc server page is now this: >go stack

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
I changed the script of the stack to match, but changed answer to put. The script of the lc server page is now this: go stack "teststack.livecode" -- just to show that go works too put "" & the script of stack "teststack" & "" send "executeThis" to stack "teststack" As before, it will

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
The biggest problem I see is that you can't use "answer." Answer is a gui dialog box that requires action (click ok.) If you want the text to show up, use put. (a put with no target container goes to stdout IE to the web page) On Fri, Jan 20, 2017 at 3:35 PM, Rick Harrison via use-livecode <

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Mike, I was able to get your example to work fine, so it proves that I’m touching the stack Ok, but when I try to send a message to a handler script in the stack it doesn’t execute the handler. Example: send “executeThis” to stack “teststack” In the stack script of “teststack” the contents

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
What jacque was referring to is a different animal. An executable set up as a cgi, that (if I recall correctly has a startup script and that after script completion, exits) The lc server itself runs in cgi mode (as apposed to as a module I believe) and unless you're using the earliest version

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Jacque & Stephen, Right now I’m running LC Server version 8.1.2 as it is supposed to be set up from the mothership’s perspective. I’ve been looking at Jacque’s site. The information there seems a little old and dated. Is the information there still current enough to work? It also looks

Re: LC Server & Server Based Stack?

2017-01-08 Thread Mike Bonner via use-livecode
It was mostly in response to having lc (in cgi mode) talk to a different (non-http connected) process. On Sun, Jan 8, 2017 at 10:32 PM, Phil Davis via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Mike, > > It sounds like you're talking about things that apply when your server >

Re: LC Server & Server Based Stack?

2017-01-08 Thread Phil Davis via use-livecode
Hi Mike, It sounds like you're talking about things that apply when your server stack is used in a long-running LC process. If you run in CGI mode, you don't have to deal with some of those things (like figuring out when to reload a stack). Personally I'm glad the on-rev default is CGI mode.

Re: LC Server & Server Based Stack?

2017-01-08 Thread Mike Bonner via use-livecode
Sorry I didn't get back to you till now, but it looks like things are covered as far as accessing a stack file from lc server. As for the other direction, (lc server talking to an in memory stack..) FROM the stack itself would be a simple http request, but the reverse not so much. I'm now

Re: LC Server & Server Based Stack?

2017-01-08 Thread Rick Harrison via use-livecode
Hi Stephen, Phil, & Jacque, Thanks for the info! I’ll get back to you after studying this stuff. Rick > On Jan 8, 2017, at 3:42 PM, Stephen Barncard via use-livecode > wrote: > > some stack use info as used in web app RevIgniter: > >

Re: LC Server & Server Based Stack?

2017-01-08 Thread Phil Davis via use-livecode
On 1/8/17 12:12 PM, Stephen Barncard via use-livecode wrote: stacks are great with LC server. For instance, one can use custom properties and libraries just by 'start using' that stack. I'm not sure about fields but I think they are accessible too. And one can test and edit everything 'on the

Re: LC Server & Server Based Stack?

2017-01-08 Thread J. Landman Gay via use-livecode
My site is focused on old-style CGI. It's an alternative to LC server scripts, which act more like PHP,. Both are viable methods but slightly different. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On

Re: LC Server & Server Based Stack?

2017-01-08 Thread Stephen Barncard via use-livecode
Jacque's site is a great resource for livecode server information. http://www.hyperactivesw.com/cgitutorial/scripts4.html there doesn't appear to be many of us, but we who use LC server will probably never have to use PHP very much any more for our web programming. And the open source version

Re: LC Server & Server Based Stack?

2017-01-08 Thread Stephen Barncard via use-livecode
some stack use info as used in web app RevIgniter: https://revigniter.com/userGuide/general/using_stacks.html by the way, RevIgniter is a self-contained framework that you might find useful for all kinds of web development in livecode. It might be a little different than your own programming

Re: LC Server & Server Based Stack?

2017-01-08 Thread Stephen Barncard via use-livecode
here's some basics from the docs http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-stacks-with-livecode-server -- Stephen Barncard - Sebastopol Ca. USA - mixstream.org On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Stephen, >

Re: LC Server & Server Based Stack?

2017-01-08 Thread Rick Harrison via use-livecode
Hi Stephen, That sounds promising.. do you know of any good examples? Thanks, Rick > On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode > wrote: > > stacks are great with LC server. For instance, one can use custom > properties and libraries just by

Re: LC Server & Server Based Stack?

2017-01-08 Thread Stephen Barncard via use-livecode
stacks are great with LC server. For instance, one can use custom properties and libraries just by 'start using' that stack. I'm not sure about fields but I think they are accessible too. And one can test and edit everything 'on the ground' first. On Sun, Jan 8, 2017 at 10:37 AM, Rick Harrison

Re: LC Server & Server Based Stack?

2017-01-08 Thread Rick Harrison via use-livecode
Hi Mike, I’m looking at all options here. So yes, I’d like to be able to do the first option, and would like to know if the second option is possible, and if there are any examples out there for it. Both animals would be welcome in the barn so long as they can co-exist with each other.

Re: LC Server & Server Based Stack?

2017-01-08 Thread Mike Bonner via use-livecode
If you mean a simple interaction, IE lc server loads the stack, gets or changes something on the stack, and save the changes to the stack, thats a pretty straight forward thing. If you mean inter-process communication between lc server and an actively running stack, thats a different animal

LC Server & Server Based Stack?

2017-01-08 Thread Rick Harrison via use-livecode
Hi there, I’m trying to find out if anyone has ever gotten a LC server to successfully interact with a LC Stack running on the same server such that one can read and write information to fields on such a stack. If so, could you please point me to some good examples or other resources for this?