Re: PDF Manipulation was Design Question
Bob S: Thanks for replying to my post. It seems the situation is as I thought although making a GUI with Livecode to activate an external library is easier than using other tools to make a GUI for an external library. When I started this conversation I assumed I would something like that. No, it is not form data we are dealing with. A static, non-secure, PDF file is sent to us. We print it, scan it, label the flights with the needed codes by hand, scan the printed copy with the labels and email the scan to someone. Hoping to improve the situation to at least the point where they send the PDF file and then we run a programme that creates a new PDF which is sent back to the originator. I have successfully used the FDF data format for something unrelated but at work in the past. It would be great if it were the case here, but alas, it is not. ___ 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
PDF Manipulation was Design Question
Comments people were making to William in the Design Question thread have caused me to question some things and I am going to the list here to get an answer. Can Livecode edit existing PDF files? I would think this far beyond its scope and just not the sort of thing it would be involved with. Am I wrong on that though? At my work we have a, frankly stupid, situation that could be made so much easier if we had software do a simple function. All that is needed is that a PDF file that comes to me gets some of its text changed and the changes are according to a specific pattern. I thought about getting around to making something that would do that in one of the more powerful scripting languages. However, if I could use Livecode it would have some advantages. Namely it would be easier to create and be very multi-platform. So here I am having assumed that Livecode is not a tool that could do what I want but now asking can I use it to automate editing text in a PDF file? The edits are simple, BTW. I work at an airport and it would just need to replace a flight number with the flight number and code next to it. The code is always the same for a particular route. So for example, if the incoming PDF has the text "WS252" on it I would want it changed to "WS252 LV". Each file would have 20-30 flights to change like this. Thanks. ___ 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: Interface Resolution
Jacqueline, thank you for adding to my thread about the interface on 4k monitors. I did as suggested but there is no persistence with the plugins dialogue box. If there is a save, OK, or apply type functions I cannot find them. Closing the window does not appear to save the changes as there are not there later, including after quitting and restarting. After fooling around with it all your post caused me to think of it different and after a bit I got it working when picking my plugin from the development menu. That is to I run the IDE, go to the development menu and manually run my plugin script. Takes only a second so not bad. So getting it to run upon startup will be nice if I do, but I can live with this setup. Making the text in the drop down menus legible is something important I still have to do, but thanks to Jacqueline, Peter, Richard and Ralph for getting me to this mostly usable point. Work arounds are not as good as things working but having the ones I have make things better than before and good enough to have bought me time to get everything in good order. ___ 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: Interface Resolution
Never mind, I got the plugin to appear in the list in the plugins dialogue window. I selected it, set it to "LiveCode starts up" and "Invisible". Quit the IDE and restarted it. Nothing happens. Typing each command into the message box affects things though. I can kind of work with doing that while I try to find out the connection between the OS interface settings and Livecode reading them (if it does). One big issue still is the text on the drop down menus remains the same size. If anyone happens to know which file controls that I would be glad to hear the details. At some point I may scale each one of them one at a time until I discover what it is, if any. Maybe the font size is not even controlled by a stack script. Thanks for the help all that posted. ___ 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: Interface Resolution
Ralph, thank for for the specific instructions. Thanks to the others and poking around I knew some of that, but the extra info was stuff I needed to know. Unfortunately, the script does not appear in the list of plugins in the Plugin Settings dialogue. Did basic things like double check the directory, quit and restarted the Livecode IDE, etc. Will keep following around with it, but if anyone has a theory off the top of their head for the lack of the plugin showing up I would like to hear it. ___ 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: Interface Resolution
I felt up to trying one of the suggested workarounds for my interface scaling issue, specifically making a script to run as a plug-in. The plugin in does not appear on the plugins menu and I do not know what I did wrong. The link to creating plugins was helpful, but lacked specifics. Do I need to do something special to make it a plug-in? Such as having a shebang statement or a special command at the top declaring it a plug-in? Do it have to have a specific naming format? Should it begin or end with "rev" for example? I called it "intefaceScaling.livecode". Perhaps that was wrong to do. Looking at existing ones as examples I did not get the impression that was so. When I ran the command "put the stacks" it outputted the following. /opt/livecode/livecodecommunity-9.6.0.x86_64/Toolset/palettes/tools/revtools.livecodescript /opt/livecode/livecodecommunity-9.6.0.x86_64/Toolset/palettes/message box/revmessagebox.8.rev /opt/livecode/livecodecommunity-9.6.0.x86_64/Toolset/palettes/menubar/revmenubar.livecodescript Do I need absolute filenames in my script? Do I need anything else in the script that makes up my plugin? Currently all I know to type is the following. set the scalefactor of stack "revtools" to 2 set the scalefactor of stack "revmessagebox.8" to 2 set the scalefactor of stack "revmenubar" to 2 Surely I need more than that. Sorry for my ignorance of what should be easy. ___ 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: Interface Resolution
Peter, thank you for those suggestions I will try them once my treatment is done tomorrow. Richard, I am using Kubunutu and KDE for some reason does not get every app when using its interface scaling setting. It gets almost all of them, but does not affect a few. It may be these apps are doing something wrong that the Livecode IDE does as well, but it is also possible it is a bug in KDE settings that only affects a handful of apps so it goes less noticed than it should be. So what I am saying is I will have to investigate more to see if it is the OS or the IDE that has a bug with scaling interfaces. A work around is good for now, but in general, yes, I should have something (in the OS or app) that just does it for the long term and that is worth investigating. BTW, I have greatly delayed working on the project that I thought Livecode could do well and brought me to it, mostly do to changes at work and health problems. This issue with the new monitor came up when I showed my brother the Livecode IDE and tell him about the platform. "Like Hypercard" really sucked him in, too. He was very interested and I may have gotten someone to try it out. Do not even have my own main app done and I recruited someone to try the platform. ___ 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: Interface Resolution
Peter, thank you for the information about changing the scale of the IDE user interface. You mentioned that if I put a script somewhere to affect the IDE stacks that it should work. I looked up the IDE stacks as per your directions. Thanks for those. I do not know where a good somewhere to put such a script would be. Is there a directory that gets its scripts execute upon running the IDE? Or can I put it anywhere and take other action to have it run with the IDE startup? Thanks. ___ 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
Interface Resolution
Hello, all. I do not want to be asking this as it seems like something I can easily look up, and it is a simple thing, but I am asking because I just could not find out on my own despite trying. Trying allot at that. The interface for the Livecode IDE is too small on my fancy, new 4k monitor. I have changed OS settings to help with other programs and it has for most of them. Some of the unaffected ones had built in features to help with the interface resolution and others are still a problem for me. Livecode is unaffected by everything. Would someone please tell me if Livecode has anything inside it to change the IDE interface resolution or if I have to depend on my operating system to take care of it? Livecode 9.6 build 15516 Kubuntu 18.04.1 Every reference I find talks about making your livecode stacks/apps look better in 4k while all I care about right now is getting the IDE to look legible at 4k. Thanks for any help provided. Sorry to ask something like this on the list. ___ 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: Chromebook apps?
Despite using Raspberry Pi devices allot I somehow did not think of ARM chips. I did not know Chromebooks were based on them. ___ 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: Chromebook apps?
Could you not just deploy a Linux desktop Livecode app to a Chromebook? ChromeOS is a Linux distribution, if admittedly a stripped down one, after all. You can install some regular desktop Linux software such as regular Libre Office on Chromebooks. Some software you cannot install though and I do not know what the limiting factors are. I do not have a Chromebook to test out LC apps on but thought I would mention this point. Apologies if there some obvious reason not to try this that I missed. ___ 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: Recommended (simple) Linux distro for Livecode server home dev/test?
Hello, Kieth. My health problems have kept me from really participating on the list for a long time but I stayed as I want to get back to using Livecode at some point. Your question about linux distros for server use on old hardware though is something I can comment on. Sorry I did not post this earlier before you more or less made a decision. At first I though the suggestions made were terrible because you said it was old hardware. Then I realized the problem is I am old and the others who responded were not picturing machines from the mid 1990's unlike me. I would go along with the suggestions made, especially the Lubuntu one assuming your hardware can handle it. If it cannot please post a follow up with an idea of how old your hardware is and I will make some specific recommendations. Let us hope your machine is not so old we start talking about Slackware installations but if we do I will get you some help with it. :-) The best way to make Ubuntu more efficient is to use a desktop environment (DE) that is less fancy and therefore less resource intensive. (Any flavour of Ubuntu can make use of any DE just by installing some extra software packages. Keep that in mind if you for some reason need to change the DE.) We could make the system even more efficient by starting with a base Debian install and building it up piece by piece to what you need. (Ubuntu is Debian based by the way.) Not as newbie friendly as installing Lubuntu but not hard either. Just something I am throwing out there as a backup plan. We can discuss it if you need it, but you will probably be OK with trying Lubuntu, etc. Good luck. Post a follow up if your hardware cannot handle the initial suggestions and we discuss other options. ___ 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
OT: Automate Modifying a PDF
Hello. There is no concrete reason I should be posting this off topic question to this list but you all just seem like the sort of people who would know how to go about a particular task I need help with. Previous off topic posts showed good knowledge of programming ideas from non-me list members. I want to automate the process of marking lines on a PDF file. Right now a PDF is sent to my work from an airline, someone prints it out, then using some rubber stamps to mark certain flight numbers. The gflight number always gets marked the same way. So flight 3452 might get marked with "LV" and flight 252 might get marked with "LVT" for example. Then we scan the stamped print out and email the image to someone. When you are doing it it feels even more stupid than it sounds. My goal is to automate this. Load the PDF into a programme or run a script on it, have the script replace the flight numbers with the number and what should be on the stamp. For example it would find flight "252" and replace it with "LVT 252". It would do this for every flight, then save a new PDF (or overwrite the original, does not matter). Would like to receive the PDF from the airline, run the programme/script and then send a new PDF back to them. I labelled this off topic because I am thinking someone will suggest a python library or somesuch (command line script is OK) but if by some miracle LiveCode can do it, great, I will do it that way and it will become on-topic. Thanks for any guidance. ___ 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: [off] Do me a solid
Mark, I am glad I am not the only one who remembers Lee selling us out. I do not put more validity or faith into the project because of him. I just mentioned him because he was doing it. Still, mostly I want to understand it. What really is it? The article just says it is to create something we have. I for one say you are right to mention the DRM thing. We cannot forget. ___ 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: [off] Do me a solid
Tom, thanks. Was not aware of IPFS. Looks interesting. When I have more time I must read about it in detail. Have not checked on Xanadu in a while. Little faith it will be further along than last time I checked considering it was started before I was born and how old I am. I do applaud it though and it was very pioneering. This IPFS is very intriguing. Very. ___ 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: [off] Do me a solid
Mike, thanks for the link to the Berners-Lee article. Could somebody please explain to me what he is doing as described by the article though? It says he is taking something decentralized like the world wide web and is making it decentralized. I can do that. There I just did it. Anyone can host a web server now. They talk about data and storage control and we have all those things now. People choose to use Faceook, not Diaspora, etc, they choose to use Google Drive not a local hard drive, etc. We already have the technology and finished applications to do everything mentioned in the article. I do not meant to sound critical or mean I just honestly do not understand the point of the article and would like to know. Or am I just overthinking it and the only point is Berners-Lee has a better way to program these things? ___ 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: [ANN] animationEngine is free now
Tom, the original author of the software can release his or her software in dual or multiple licences. This does not affect previous GPL releases. So I could make something available under a commercial and a GPL licence. If someone wanted it for free nothing stops them from using the GPL version. Maybe there is something they like in the commercial version licence though so they pay for it. Still does not stop others from using the GPL version though. You are right, if it is GPL it is so forever, but the original author can also release/re-release it with another licence. THE GPL version with all the terms that go with it still exists though. The original author cannot make you pick one licence or the other. Users with the GPL continue to have all the rights of the GPL. Those users can choose to download a copy with the other licence if they want though, as long as they obey the terms of that licence. In the case of releasing the software you were discussing in the public domain now, I can just download it again and say I have the public domain version, not the GPL version. Or in practical terms use the GPL one knowing that the author will not care because he wants it to be public domain and knows I can get the public domain version easily. Essentially there are two versions that are identical, but have different licences and you can choose your version based on the licence and the GPL one will always be GPL but the author can make other versions. ___ 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: Data Persistence
Hello again, everyone. Jacqueline, I enjoyed the fact you shared your story of not conforming to gender stereotypes with your childhood interests. Find it sad that science and engineering in general was (is?) considered a boys thing. Feel like I want to inject my two cents worth about software licences but it is a topic that could derail the list and I know I should not contribute to that. Know I was OK with and understood the off the cuff nature of "silly" and definitely do not agree with everything licences force upon us in modern times. So I continue to ask questions to help with my data persistence problem on Android. While I want to make sure my syntax is correct I firstly need to know if conceptually what I am doing will work/is correct. On my three cards (each records numbers for a different flight) the fields now all save their info to an array, flightArr[], upon closeField as suggested by the crowd here on the mailing list. I have it set-up so that when I stitch to another app (a phone call comes in, or I need to look up an airport code using an app, etc) it saves the info from each field on every card to a text file and upon opening it repopulates those text fields. This is accomplished using the handlers on shutdown and on openStack. The change I am going to try unless told not to in reply to this message is to encode the array into something and deencode it upon openStack. So each field would have put something into the array upon closeField. Would it work that upon on shutdown I could just say encode the array and then upon openStack I deencode the array and have the commands to populate the appropriate fields with their values from the array that was just deencoded? My array is called flightArr[]. Want to check with all of you that the syntax I was going to try is correct, although I suppose it does not matter if conceptually this is a bad idea. This would be on the stack. on shutdown set the defaultFolder to specialFolderPath("cache") put arrayEncode(flightArr) into theEncodedArray put theEncodedArray into URL ("binfile:" & theflightArray) pass shutdown end shutdown on openstack set the defaultFolder to specialFolderPath("cache") put URL ("binfile:" & theflightArray) into theEncodedArray put arrayDecode(theEncodedArray) into flightArr put flightArr[1] into field flight of card 1 put flightArr[2] into field sta of card 1 put flightArr[3] into field ata of card 1 # Etc, etc, for each text field for each card end openstack I see a few things already that make me think it is unlikely to be that simple. Also the array probably needs a "[]" after it every time. So it is probably embarrassingly wrong and I should spend a little more time reading the dictionary before sending this off but I have to leave for work in a few minutes. Thanks for your help. ___ 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: Data Persistence
A little less busy now so I can look at my app some more. As you mat recall I was asking about data persistence. Thank you to the additional people who welcomed me. I contrast this with the time I asked a question on Usenet about a scripting language I was learning and the first reply told me I was awful (true, which is why I was asking questions) and to come back and only ask questions when I have the script I posted working. As for contributing brains. Yeah... I supposed I could fake that part for awhile. Just do not ask for kidneys as you will get nowhere there. Klaus thank you for mentioning closefield. Did not notice it before and it seems like it would be just the thing for me. The data is simple, so I think I will start out by trying to save it all in an array and doing so every time there is an entry or change to an entry using closefield. And that brings me to today's follow up question. In some cases I have a button that when pressed put the time inside the neighbouring text field. So when a plane lands I pressed the button labelled "ATA" and it puts the current time into a text field next to the ATA button. How would that count as focus? Would having the app place something into the field put focus on the field? What I am really wondering is when it comes to the buttons can I leave them be because the text fields have code to save their info when the focus leaves or should I add code to the buttons to tell them after placing the info into the text field, save same info to an array? Thanks. ___ 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: Data Persistence
Thanks for the extra comments everyone. Glad my thought process was correct, databse is overkill, saving every text change is too much, etc, etc. As I said I will not be able to really do anything until next week. Thanks for mentioning the closeField command guys. I will check it out, but the name sounds like it explains it, loose focus on the field, field is closed, handling activated. Because I like word play I might make my own text file format, the "Extended Livecode Optimized Serialized Object Notation" format or ELSON. It adds just enough features to LSON to make identical to JSON. Being stupid and redundant it will be the hot new buzzword in the computing industry. Using arrays intigues me, especially if I can just keep it in RAM (It is a small amount of data for sure). Thanks for your continued help everyone. Off to super busy weekend planning and working on an event for Sunday. Will update you/ask follow-ups next week. ___ 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: Data Persistence
Tom, thank you for welcoming me. Much different than some online programming groups. :-) Brian and Tom thank you for your replies about my Android data persistence problem. An SQLite database seems like extreme overkill but I will give it a try if it is needed to get the app to work. Does this require me to pre-install any sort of database software? Brian, I gathered from your post that the only way to work with a text file as data storage on Android is to save every time a field is changed? How would I do this in such a way that it knows to save when "1421" is typed as a time of day as opposed to the app trying to save it after "1" is typed, then again when "2" is typed, etc. Or perhaps there is no way and I have to re-save every time a character it typed. I am super duper busy this week, especially this weekend. Will really get back to the problem in earnest next week. ___ 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
Data Persistence
Hello, all. I am new to Livecode development but not computing. When I heard of something that was inspired by Hypercard I had to know more. Used Livecode to make a little app on my phone for work but the level of interest this app generated now make me want to finish it, and maybe even share and/or sell it. Livecode is pretty cool and I am looking forward to learning how to use it and do stuff with it. So my first (and I sadly suspect not last) question to the list is about persistence on the Android platform. My job is in the aviation industry. For now I want to get it working. Then I will polish it off, beta test it, etc. One airline rep gave me his card and said to call him about it if I wanted to sell it. The get it working part is where I need your help. I was unclear on what Livecode could and could not do so I emailed them and a very helpful person named Heather educated me a bit. Now that I know it might work for my application I would appreciate your help in getting it working. Right now it will be an Android app. iOS app later probably. The app is to help me record times and other facts about plane landings (like when the plane landed and how much fuel is requested by the Captain). At the end of a flight I can press a button and an email addressed to our operations centre is auto-populated in the body of the text with these numbers. For example if I press the button labelled "ATA" (actual time of arrival) it places the current time in the text field next to the ATA button. I can touch the text field and edit the time if need be. What I need help with is the issue of persistence. If I get an SMS message, a phone call or an alarm goes off the data will be wiped out when I return to the app. Sometimes if I leave the app to check something else and come back the data is there and other times the text fields are all blank. Tried saving the data in a text file and having the app load it up each time it starts. Most of the time this does not work. Usually when I start the app up again at the beginning of the next shift it starts up with the times of yesterday's flight. So I would like to know how to properly hold the data so the entries in the text fields are still there when I go to another app then come back to mine. looking to have basic persistence in my app. Guidance on the (or one of the) proper way(s) to accomplish this would be most appreciated. ___ 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