Re: Calling a livecode executable -ui from LC server and get back a result.

2017-05-05 Thread Malte Brill via use-livecode
Mark,

thanks a lot for taking the time to explain things here! Very valuable 
information! I will certainly give it a try. Just need to install Vis Studio :-)

While you are here: would you think, that a call to cURL should work on Windows 
server? For the life of me I can not get it to, even for the simplest calls. 
Always comes back with an out of memory error, which I believe is a lie in the 
status code. 
This is actually what started the experiments for me. I will give Alex 
suggestion a try also, as this might be a workaround that might actually work. 
And all that, just because some 3rd party insists on cookie authentication for 
a Webservice where I would need to get the Headers back from a post. *sigh*

Thanks all!

Malte


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Calling a livecode executable -ui from LC server and get back a result.

2017-05-05 Thread Malte Brill via use-livecode
Hi Roger,

indeed, I have considdered that. But I have no experience on how this would 
behave. Actually what I was trying to do is reducing the involved components, 
instead of introducing more and more over the course of building the system. LC 
- Server came natural there, as it would have allowed me to use liveCode inline 
and having the proven stability of Apache, which is needed for other purposes 
in the project also. It is so unfortunate, that LC-server gets me to 95% of 
what I need to do and then you need to revise your decisions, because some 
things that you would expect to work, just won’t. I can most certainly move 
everything that is needed into a liveCode client, but I would not want to do 
that because of apllication design reasons. Pitty. If I were to set up a 
faceless app as a service / daemon, I am not too sure if I would do it in LC, 
given that it would be a single threaded process and I might need concurrency. 
The pretty part of the CGI approach is that it starts an instance per 
connection that then can act individually. Well, back to whiteboard I guess.

Thanks a lot,

Malte



> Have you considered running a faceless Desktop app as a service, having it 
> watch for a socket message, or a file, or even clipboard content to signal it 
> to do something. You could keep an account signed in with an app running 
> -with-or-without a UI. 
> 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Calling a livecode executable -ui from LC server and get back a result.

2017-05-05 Thread Malte Brill via use-livecode
Hi Charles,

thanks a lot for the information. I am afraid I can not use it in this context, 
as this is for an Open Source project. For other things this might be an option.

Cheers,

Malte

> Hi Malte,
> 
> If you are able to use the commercial version of LC server, the tsNet 
> external is supported which provides equivalent functionality to libUrl.
> 
> Regards,
> 
> Charles
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Calling a livecode executable -ui from LC server and get back a result.

2017-05-05 Thread Malte Brill via use-livecode
Thanks Dan, but that is not what I am after…

I have a server side liveCode application, which needs to talk to a couple of 
webservices from time to time. While this works nicely on the desktop, it does 
not do so on Server, as Server lacks some libURL functionality. First 
workaround was to shell out to cURL. This works nicely on Mac and Linux 
servers, but forever reason fails under Windows Server, which I need to 
support. So the next thought was to call a liveCode executable -ui when needed, 
but I do not get a result back there. I will not want to have a liveCode 
standalone running 24/7 on a server machine. I guess the easiest way out is to 
simply kill off the idea to treat liveCode server as a replacement for PHP and 
just bite the bullet and build everything in PHP instead. Or start an 
initiative to get libURL ported to server. I already talked to the guys in 
Scottland to see if this would be feasible, but it would cost a bit more than I 
could afford alone. I might just go with having the single command implemented 
I would need for the project (libURLLastRHHeaders), which then would also lift 
the requirements for having to use cURL or any other helper app in my case, but 
I am not quite sure if that makes sense…

Would anybody else like to see libURL feature parity between Desktop and Server 
engines and if so be willing to set up a fundraiser with me for this?

Cheers,

Malte

> You can communicate between server and desktop using sockets. Chatrev is a
> good example of this 
> http://www.bjoernke.com/index.irev?target=chatrev


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Calling a livecode executable -ui from LC server and get back a result.

2017-05-04 Thread Malte Brill via use-livecode
Hi all,

has anybody successfully done this? Especially on Windows? I would like to 
launch a livecode built application from a liveCode server script and get the 
output back (on a Server that I control) Is that possible? If so, how?

I tried a couple of things to no avail:

"
  put the time
  put ""
  put Quote & "thes.exe" & Quote &&"-ui" into tShell
  try
get shell(tShell)
put "Result:" && the result & cr &"It:" && it
put ""
open process tShell for binary read
   read from process tShell until EOF
   put "Result:" && the result & cr &"It:" && it
   put ""
  catch theErr
  put theErr
end try
put cr
put the time
put ""
?>

the helper app: In the stack script:

on startup
  send "boo" to me in 500 millisecs
  — to make sure all libs are loaded
end startup

on boo
  quit
end boo

on shutdown
  write "boo" to stdout
end shutdown

Thanks for all input I can get…

Malte


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

LC Server on Win and CURL

2017-04-06 Thread Malte Brill via use-livecode
Hi all,

I wonder if somebody of you can enlighten me here.

I am trying to use curl with liveCode Server. No Probs on a Mac, but Windows is 
behaving strange…

set the shellCommand to "cmd“ — mail client might put in wrong quote mark
put shell("c:/curl/bin/curl " & quote & "http://google.de“ & quote) 

-> curl: (27) Out of memory

But on the commandline I get what I expect using

c:/curl/bin/curl "http://google.de;

Anybody know what is going on here and how to get around it?

Cheers,

Malte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: [Long] Moving a REST request from Desktop to Server

2017-03-08 Thread Malte Brill via use-livecode
Hi Richard,

no, I did not considder using a standalone as a CGI engine. I am in a rather 
difficult environment with the project (government servers that have ridiculous 
tests and approval times for changed solutions). On top of that, I would not 
want to lose the benefit of using liveCode PHP style. For most of what I do 
with LC server I am perfectly happy with the way it works. However, not having 
some stuff that libURL offers available (even though the dictionary states 
otherwise, in the case of libURLLastRHHeaders, Platforms desktop, server). 
Technically it should be possible if the Server script does a POST to a remote 
Server to see the RAW response in some form. In my case this would help a lot. 
I built quite a nice Framework (at least it works quite well for me) around the 
Server engine and it would be quite labor intense to change what I have. The 
only option I would see, would be moving the WEBSERVICE request into my LC 
Desktop client, which is what I’d rather avoid… :-(

Cheers,

Malte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

[Long] Moving a REST request from Desktop to Server

2017-03-07 Thread Malte Brill via use-livecode
Hi all,

I am trying to move a request I do from a desktop app to a liveCode server 
script and am facing the problem that some of the stuff I use (most of it 
libURL stuff) is not available on the server. Now I wonder how I could 
translate it…

Scenario is the following:
Problem is libURLLastRHHeaders() is unavailable on server and can not easiely 
be copied from libURL
Anyone got an idea?

local sCookieHeader

on mouseUp
local tURL,tUser,tPassWord,tCookie,tSubmitId,tsubmit,tJson,tJsonArray
local test
try
set the httpHeaders to empty
put „aUser" into tUser
put „aPassword" into tPassWord
put "264812" into tSubmitID
put "Log+in" into tSubmit
get libURLFormData("userName", tUser,"password", 
tPassword,"submit",tSubmit,"submitID",tSubmitId) — not available on Server, but 
can be copied from libURL
post it to url "http://test.com/login.php;
_storeCookies libURLLastRHHeaders() — needed to authenticate. 
libURLLastRHHeaders unavailable
set the httpHeaders to sCookieHeader
put fld "URL" into tURL
put URL tURL into tJson
catch theErr
put theErr
end try
end mouseUp


## Parse header returned from a server and create a cookie header that
## can be sent back: Cookie: cookie1;cookie2;cookie3;...
private command _StoreCookies pHeader
local theCharNo,theCookieLine,theLineNo,theOffset
put empty into sCookieHeader
put 0 into theOffset
repeat forever
put lineoffset("Set-Cookie:", pHeader, theOffset) into theLineNo
if theLineNo > 0 then
add theOffset to theLineNo
put line theLineNo of pHeader into theCookieLine
delete word 1 of theCookieLine ## Set-Cookie:
put offset(";", theCookieLine) into theCharNo
if theCharNo > 0 then
delete char theCharNo to -1 of theCookieLine
end if
put theCookieLine & ";" after sCookieHeader
put theLineNo into theOffset
else
exit repeat
end if
end repeat
if the last char of sCookieHeader is ";" then
delete the last char of sCookieHeader
end if
if sCookieHeader is not empty then
put "Cookie: " before sCookieHeader
end if
return empty
end _StoreCookies



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Howto read-write-import-export SAP tables

2017-03-02 Thread Malte Brill via use-livecode
Hi Thierry,

it might be easier to send IDOCs to SAP, which could either be FIX Record files 
(if transfered by SAP ALE), or XML (if connector like PO is set up).
Check Transaction WE60 to get an XSD. SAP might need a connector to accept the 
iDOCs (like for Example PO), but with all possible customisations and User 
exits I would not dare to write directly to the SAP DB. :-)

Cheers,

Malte


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Dumb deployment question

2017-01-26 Thread Malte Brill via use-livecode
Hey Trevor,

https://github.com/trevordevore/levure 
this is looking like a potential winner. I would love to see how involved it is 
to move an existing application over to the framework. I have a rather big 
application that uses a couple of substacks which I want to make VCS friendly. 
Up until now it does not use any frameworks at all (besides the stuff that I 
wrote myself) so this shall be interesting.

I am not claiming to understand what you set up as yet, so I guess this 
requires quite a bit of investigation and would not be a quick shot. At first I 
was aiming at something lightweight that would work for my personal usecase, 
however I see the benefits of structuring work using a framework. Very very 
interesting.


Cheers,

Malte


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: can't open file on web server

2017-01-26 Thread Malte Brill via use-livecode
Hi Tiemo,

did you try the URL directly without using the binfile keyword?

put URL „http://www.somServer/someImage.jpg 
“ into img „myImage“ ? This works here. If 
you are using either the file or binfile keyword you are indicating file access 
to the engine, which might work with a UNC path, not if the protocoll for 
transmission is http though. 

Hope that helps,

Malte

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Dumb deployment question

2017-01-25 Thread Malte Brill via use-livecode
Folks, please forgive me. I have not yet deployed with one of the current 
engines. Las standalone was built using 7 (gnashing my teeth a little bit).
Now, I would really like to make the first serious standalone using 8.x (final 
might be using 9.x). This is still a bit ahead, but I want to prepare. I would 
really like to work with script only stacks. But what do we need to do to have 
them available as library in a standalone. Right now I am being lazy with my 
project and make regular stacks a substack of my mainstack, which I then start 
using. How would I go about this with a Script only stack, which appears to be 
only a text file, right? Upside until now was quasi single file distribution, 
but I could very well live with breaking that. Any good tips on deployment?

Thanks a heap,

Malte


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What has changed in MacOS 10.12 in handling code pages?

2017-01-17 Thread Malte Brill via use-livecode
Hi Tiemo,

I do not know what changed, but I see the same. Earliest version to fix this is 
6.7.6 as far as I can tell.

Cheers,

Malte


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


I'm a stupid GIT

2017-01-07 Thread Malte Brill via use-livecode
I also am a stupid GIT. Way over my head. That said - can’t this be somehow 
automated so that one could download nightly builds? If it could I would be 
willing to throw in a couple of Euros to make that happen (to be honest, not 
before the end of April though and most likely not enough Euros to make it 
happen alone).

Cheers,

Malte

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode