Exporting text from LiveCode in iOS
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Exporting text from LiveCode in iOS
Hi everyone. I am new to iOS development, and am trying to figure out the best way to export text from Livecode. I learned on the forums that automatically copying to the clipboard is not an option in iOS, so I'm looking for a solution.
Here is what I need to do:
A student completes a task on their iPad, and my program creates a text-based report that the student needs to get to me anonymously (I am doing research with students, so it needs to be anonymous, hence email won't work). My plan was to create a button to "Share Data" which would then copy the text and send students to a web form where they would paste and submit their data.
I read through the LiveCode documentation and I have no understanding of Native Fields, but that seems to be the only way to copy and paste in iOS (and it seems that I can't copy the text automatically, so it's not ideal). Before trying to learn how to use a native field, I figured I would ask here 1) whether this would allow me to at least have the students select all, then copy the text and 2) whether this is the best way to do what I need (my web form can also accept file uploads, if that matters).
Thanks!
Here is what I need to do:
A student completes a task on their iPad, and my program creates a text-based report that the student needs to get to me anonymously (I am doing research with students, so it needs to be anonymous, hence email won't work). My plan was to create a button to "Share Data" which would then copy the text and send students to a web form where they would paste and submit their data.
I read through the LiveCode documentation and I have no understanding of Native Fields, but that seems to be the only way to copy and paste in iOS (and it seems that I can't copy the text automatically, so it's not ideal). Before trying to learn how to use a native field, I figured I would ask here 1) whether this would allow me to at least have the students select all, then copy the text and 2) whether this is the best way to do what I need (my web form can also accept file uploads, if that matters).
Thanks!
Last edited by mismel8 on Thu May 28, 2020 6:13 pm, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Exporting text from LiveCode
I'm unclear if you wish to export a text document, or copy text from a field to paste elsewhere.
Re: Exporting text from LiveCode
LiveCode can take the text, confirm it is all correctly completed, convert it to a format for submission, encrypt it, along with some markers to ensure it is a genuine submission, and POST it to a url for receipt, sanitisation, verification and recording on your server.
No clipboard required. No swapping to another application.
So, would you be in a position to write a server script to receive a POST of data and process it? Or are you limited to upload of a file because of server configuration restrictions? Where do you see needing most help?
No clipboard required. No swapping to another application.
So, would you be in a position to write a server script to receive a POST of data and process it? Or are you limited to upload of a file because of server configuration restrictions? Where do you see needing most help?
Re: Exporting text from LiveCode
I don't have access to a server, so I am not sure if that option would work (something like that would be great if it would). I only have access to online survey forms (Qualtrics and Microsoft Forms), so that's where I was planning to have them paste their data into a text box and then submit. I am guessing that wouldn't cooperate with POST.
The only option I can figure out is to display the data in a Native Field, have the student select and copy the data, open the link to my survey, paste the data into the survey, and click submit. Obviously that is cumbersome, but given the limitations I am working with, maybe the only option.
The only option I can figure out is to display the data in a Native Field, have the student select and copy the data, open the link to my survey, paste the data into the survey, and click submit. Obviously that is cumbersome, but given the limitations I am working with, maybe the only option.
-
- Posts: 720
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: Exporting text from LiveCode
Although I would not prefer this method if it is the only option you have got you do not need the student to copy the data from a field. You can use the clipboard functions from LiveCode to do this.
see http://lessons.livecode.com/m/2592/l/12 ... -clipboard
Regards,
Paul
see http://lessons.livecode.com/m/2592/l/12 ... -clipboard
Regards,
Paul
Re: Exporting text from LiveCode
Hi Paul,
no clipboard related stuff available on the mobile platform!
Best
Klaus
no clipboard related stuff available on the mobile platform!
Best
Klaus
Re: Exporting text from LiveCode
I guess it might be possible to get LiveCode to Post data to a Microsoft Form, but I don't have any experience with the mechanics of that.
Is MS Forms a suggested interface because of the post receipt processing/ aggregation/ reporting that's being done? Or just because it can be switched on easily on your organisation's server?
Would you be able to work with the data format if you got a server configured to handle data posted that way? What about the implications of using an external server for that? (There are recent discussions here about very cheap hosting on LiveCode-ready servers that you could post to, receive and process submissions and then collect the aggregate data from.)
Is MS Forms a suggested interface because of the post receipt processing/ aggregation/ reporting that's being done? Or just because it can be switched on easily on your organisation's server?
Would you be able to work with the data format if you got a server configured to handle data posted that way? What about the implications of using an external server for that? (There are recent discussions here about very cheap hosting on LiveCode-ready servers that you could post to, receive and process submissions and then collect the aggregate data from.)
-
- Livecode Opensource Backer
- Posts: 9385
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Exporting text from LiveCode in iOS
How about exporting the data as a text file and then posting that to you, where you can then do whatever you like
with the text file?
with the text file?
Re: Exporting text from LiveCode in iOS
If you have the commercial version of LC, couldn't your app use tsNet to send an email from your own SMTP account to your own account?
http://lessons.livecode.com/m/4071/l/68 ... t-external
Jim Lambert
http://lessons.livecode.com/m/4071/l/68 ... t-external
Jim Lambert
Re: Exporting text from LiveCode in iOS
Thanks for your suggestions, everyone. I have the free version of Livecode. We use Microsoft Forms because my organization has Office 365 and it includes that (it's basically the same as Google Forms). I don't have any funding for this project (and likely won't have any in the near future due to Covid-19 related budget restrictions), but it's good to know that that may be an option in the future. Perhaps if I run a pilot version of this (using the copy/paste method) and things turn out well, I can use an external server and do it that way in the future.
Re: Exporting text from LiveCode in iOS
https://support.microsoft.com/en-gb/off ... dee909e845
The above link shows some suggestions how to share a form with users, and one of the options is to copy the source code of a form to embed on a web page or blog. It would be very interesting to see the code generated to be embedded. It could conceivably be something that could be wrapped in a LiveCode app. Or ...
The above link shows some suggestions how to share a form with users, and one of the options is to copy the source code of a form to embed on a web page or blog. It would be very interesting to see the code generated to be embedded. It could conceivably be something that could be wrapped in a LiveCode app. Or ...
Re: Exporting text from LiveCode in iOS
Another idea worth throwing out there is the use of Dropbox. If you set up a Dropbox for the project with a unique email and login, you could then have your LiveCode app save a text file of results (with a unique name on each device so that you don't get duplicates) and then use the code to upload that text file to Dropbox for analysis later. You could display the text file to the student, then ask permission to upload anonymously - just so that the permissions etc are very transparent. LiveCode works well with Dropbox so you could probably get help here on the forum to make the code happen.
Kelly
Kelly
Re: Exporting text from LiveCode in iOS
we use dropbox to do exactly this, and we go both directions - to the devices and from the devices.
-
- Posts: 720
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: Exporting text from LiveCode
Oops.. missed the mobile platform part....
Did some digging and it seems that other than Copy/Paste you cannot import data into MS Forms..
https://techcommunity.microsoft.com/t5/ ... -p/1220821
Paul
Re: Exporting text from LiveCode in iOS
Not that we are here in the iOS forum...