Hi all
Sorry for my long absence!!
I have a stack that I have worked on for years. I now need to run it as a web service rather than a desktop app. Is this now an option?
the stack manipulates text using lots of LiveCode and regex. So I need a text file to be sent to it and it will send back a text file.
Thanks.
Regards
Kaveh
New to HTML
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
New to HTML
Kaveh
-
- Livecode Opensource Backer
- Posts: 9443
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: New to HTML
I maybe very stupid, but what is the connexion between the thread title "New to HTML" and "So I need a text file to be sent to it and it will send back a text file."?
I don't think 'anything' is going to SEND a text file to a Livecode stack/standalone: the Livecode stack/standalone is going to have to FIND a text file and then import it.
Possibly a bit like this:
and then, having processed it, the Livecode stack/standalone can export the contents of a field into a new text file.
I don't think 'anything' is going to SEND a text file to a Livecode stack/standalone: the Livecode stack/standalone is going to have to FIND a text file and then import it.
Possibly a bit like this:
Code: Select all
on mouseUp
answer file "Choose a TEXT file to import"
if the result = "cancel"
then exit mouseUp
else
set the TEXT of fld "fRESULT" to URL ("file:" & it)
end if
end mouseUp
-
- Livecode Opensource Backer
- Posts: 508
- Joined: Sun Dec 18, 2011 7:23 pm
- Location: London
- Contact:
Re: New to HTML
Hi Richmond
Great to be in touch again. Got so much help from you in the past!! I think I did not explain properly...
I have a stack where I can drop in a text file and it cleans it up for me using the handlers I have written in LiveCode. But I am the only person using LiveCode in my team. Everything else we have is web based like the rest of the universe. So in our web based application there is a text field that would normally be cleaned up in say JavaScript.
I want my code to be used as a web service. so you press a button on the web page, the text is sent to my stack and the stack sends back the clean text file.
I know there is a HTML project for LiveCode so stacks are online. I just want to know if that is now possible. Hope that is clearer...
Regards
Kaveh
Great to be in touch again. Got so much help from you in the past!! I think I did not explain properly...
I have a stack where I can drop in a text file and it cleans it up for me using the handlers I have written in LiveCode. But I am the only person using LiveCode in my team. Everything else we have is web based like the rest of the universe. So in our web based application there is a text field that would normally be cleaned up in say JavaScript.
I want my code to be used as a web service. so you press a button on the web page, the text is sent to my stack and the stack sends back the clean text file.
I know there is a HTML project for LiveCode so stacks are online. I just want to know if that is now possible. Hope that is clearer...
Regards
Kaveh
Kaveh
Re: New to HTML
Hi Kaveh,
since html5 does not support the clipboard or copy/paste, here a workaround for this problem:
https://forums.livecode.com/viewtopic.p ... 15#p227904
No idea if html5 can import/export text files...
Best
Klaus
since html5 does not support the clipboard or copy/paste, here a workaround for this problem:
https://forums.livecode.com/viewtopic.p ... 15#p227904
No idea if html5 can import/export text files...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 263
- Joined: Sat Aug 16, 2008 9:48 am
- Location: Stockholm, Sweden
- Contact:
Re: New to HTML
It can.
But I think the main issue here is to get the web deployment to act as a behind-the-scenes web service, that can be invoked without a user interface. I don’t think that is possible, as the stack and the LC engine can only function when loaded in an active web page.
A trick might be to embed the web deployment into the web page that is requesting its services, and call it from there. But it seems a bit of a cumbersome solution…