Re: Regex help...
When I'm fighting a regex, I go to http://pythex.org/ On Sun, Jun 4, 2017 at 2:11 PM, Mike Bonner via use-livecode < use-livecode@lists.runrev.com> wrote: > Not sure regex can do what you want, or if it can its far far over my > head. Would it work instead to use lc script to parse? > If you repeat through your data (each line form, with tLine as the current > line and pPage as the page to be looked for...) you can use a one liner > like this to build a list of matching lines, chop the trailing cr > afterwards, and be done with it. > > *if* item -2 of tLine >= pPage and item -4 of tLine <= pPage *then* *put* > tLine & cr after tNewDat > > > On Sun, Jun 4, 2017 at 9:35 AM, Paul Dupuis via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > I have a tab and cr delimited table of data, a sample line of which is > > below: > > > > 1Test4052,125941,4052,3,2388 > > > > The last tab delimited item "1,4052,3,2388" is actually > Number>,,, > Position On Page> > > > > So the starting page number is 1 and ending page is 3 > > > > I have a variable pPage which contain a page number, say "2" > > > > My regex filter, that was crafted by someone else, needs to find (filter > > to just) all lines starting on page 2 OR ending on page 2 OR containing > > page 2 (ie, pPage is >= starting page and <= ending page) > > > > My existing filter, below, matched lines with starting page number and > > ending page numbers but not line with page numbers between the start and > > end. > > > > put > > "(.+\t"&pPage&",\d+,\d+,\d+)|(.+\t\d+,\d+,"&pPage&",\d+)|(.+ > > \t"&pPage&",\d*\.?\d*,\d*\.?\d*,\d*\.?\d*,\d*\.?\d*)" > > into tMatchPattern > > filter lines of tCiCData with regex pattern tMatchPattern > > > > Can someone help me revise this regex to match what I need? > > > > Thank you kindly, in advance. > > > > > > > > ___ > > 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 > > > ___ > 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 > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." ___ 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: Regex help...
Forget it. I'm wrong, it's too late. Sorry. > hh wrote: > [a] all lines starting on page 2 OR ending on page 2 OR containing page 2 > ie > (pPage >= starting page) OR (pPage <= ending page) > > [b] all lines starting on page 2 AND ending on page 2 > ie > (pPage >= starting page) AND (pPage <= ending page) ___ 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: Regex help...
Your "ie" is not true. So what do you want? [a] all lines starting on page 2 OR ending on page 2 OR containing page 2 ie (pPage >= starting page) OR (pPage <= ending page) [b] all lines starting on page 2 AND ending on page 2 ie (pPage >= starting page) AND (pPage <= ending page) > Paul D. wrote: > My regex filter, that was crafted by someone else, needs to find (filter to > just) all lines starting on page 2 OR ending on page 2 OR containing page 2 > (ie, pPage is >= starting page and <= ending page) ___ 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: how to download an image
I dunno. Here's what I just did and it loaded the image with no problems. All 97,183 bytes worth. Do you have write permission to the folder you're downloading to? on mouseUp local tImgUrl local tImgName local tNewFile constant tNewFolder="/home/mwieder/Desktop" put "//s3.amazonaws.com/appforest_uf/f1496548544475x140387106221169240/grilled_cheese_on_plate.jpg" into tImgUrl put "https:" & tImgUrl into tImgUrl set itemdelimiter to "/" put item -1 of tImgUrl into tImgName set itemdelimiter to comma put tNewFolder & "/" & tImgName into tNewFile libURLDownloadToFile tImgUrl,tNewFile, "finished" end mouseUp on finished answer "All Done" end finished -- Mark Wieder ahsoftw...@gmail.com ___ 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: how to download an image
I've only tried it in the IDE so far. On Sun, Jun 4, 2017 at 12:36 PM, tbodine via use-livecode < use-livecode@lists.runrev.com> wrote: > Is this happening in a standalone or the IDE? A standalone would need > revsecurity.dll for https. > > Tom B. > > > > -- > View this message in context: http://runtime-revolution. > 278305.n4.nabble.com/how-to-download-an-image-tp4715487p4715503.html > Sent from the Revolution - User mailing list archive at Nabble.com. > > ___ > 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 > ___ 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: how to download an image
Is this happening in a standalone or the IDE? A standalone would need revsecurity.dll for https. Tom B. -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/how-to-download-an-image-tp4715487p4715503.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ 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: how to download an image
Yeah, I've got a list of URLs like the one in the first message //s3.amazonaws.com/appforest_uf/f1496548544475x140387106221169 240/grilled_cheese_on_plate.jpg I'm trying to download the images from AWS to a folder. Previously I couldn't get "put URL into binfile" to work (0kb files) so I tried downloading the base64 encoded image data instead. That required using get/post, which is blocking. Blocking is bad. So I tried getting the URL instead so I can use libURLDownloadToFile instead. I'm getting the same 0kb file problem. On Sun, Jun 4, 2017 at 10:56 AM, Mark Wieder via use-livecode < use-livecode@lists.runrev.com> wrote: > On 06/04/2017 10:06 AM, Matt Maier via use-livecode wrote: > >> Hokay, so, apparently post is a blocking command, which is a bad idea for >> multiple potentially large files. So I'm trying to use this, but it's >> still >> downloading 1kb files. >> >> *put* "https:" & tImgUrl into tImgUrl >> >> *set* itemdelimiter to "/" >> >> *put* item -1 of tImgUrl into tImgName >> >> *set* itemdelimiter to comma >> >> *put* tNewFolder & "/" & tImgName into tNewFile >> >> libURLDownloadToFile tImgUrl,tNewFile >> > > Multiple unknowns here. > First of all, you're conflating 'post' and 'downloading' which is muchly > confusing. > > I assume that tImgUrl starts with "//" at the start of this code. > Otherwise you'll need to add it after the "https:" prefix. > > And don't you want a callback message to make it asynchronous? > And remember to check the URLStatus in the callback handler. > > -- > Mark Wieder > ahsoftw...@gmail.com > > > ___ > 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 > ___ 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: Regex help...
Not sure regex can do what you want, or if it can its far far over my head. Would it work instead to use lc script to parse? If you repeat through your data (each line form, with tLine as the current line and pPage as the page to be looked for...) you can use a one liner like this to build a list of matching lines, chop the trailing cr afterwards, and be done with it. *if* item -2 of tLine >= pPage and item -4 of tLine <= pPage *then* *put* tLine & cr after tNewDat On Sun, Jun 4, 2017 at 9:35 AM, Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > I have a tab and cr delimited table of data, a sample line of which is > below: > > 1Test4052,125941,4052,3,2388 > > The last tab delimited item "1,4052,3,2388" is actually Number>,,, Position On Page> > > So the starting page number is 1 and ending page is 3 > > I have a variable pPage which contain a page number, say "2" > > My regex filter, that was crafted by someone else, needs to find (filter > to just) all lines starting on page 2 OR ending on page 2 OR containing > page 2 (ie, pPage is >= starting page and <= ending page) > > My existing filter, below, matched lines with starting page number and > ending page numbers but not line with page numbers between the start and > end. > > put > "(.+\t"&pPage&",\d+,\d+,\d+)|(.+\t\d+,\d+,"&pPage&",\d+)|(.+ > \t"&pPage&",\d*\.?\d*,\d*\.?\d*,\d*\.?\d*,\d*\.?\d*)" > into tMatchPattern > filter lines of tCiCData with regex pattern tMatchPattern > > Can someone help me revise this regex to match what I need? > > Thank you kindly, in advance. > > > > ___ > 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 > ___ 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: how to download an image
On 06/04/2017 10:06 AM, Matt Maier via use-livecode wrote: Hokay, so, apparently post is a blocking command, which is a bad idea for multiple potentially large files. So I'm trying to use this, but it's still downloading 1kb files. *put* "https:" & tImgUrl into tImgUrl *set* itemdelimiter to "/" *put* item -1 of tImgUrl into tImgName *set* itemdelimiter to comma *put* tNewFolder & "/" & tImgName into tNewFile libURLDownloadToFile tImgUrl,tNewFile Multiple unknowns here. First of all, you're conflating 'post' and 'downloading' which is muchly confusing. I assume that tImgUrl starts with "//" at the start of this code. Otherwise you'll need to add it after the "https:" prefix. And don't you want a callback message to make it asynchronous? And remember to check the URLStatus in the callback handler. -- Mark Wieder ahsoftw...@gmail.com ___ 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
How to edit Script Editor and SETemplate
I’ve got a couple of things I’d like to try with the Script Editor. I’m having a tough time figuring out how to edit revNewScriptEditor stack and specifically being able to make changes to revSETemplate. Can anyone give me a pointer on what I need to do so that I might be able to try some “enhancing” of the Script Editor? Thanks in advance, Bob PS. Yes, I know. It’s not easy to mess around in there but I’d like to see if I can add a couple of 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: how to download an image
Hokay, so, apparently post is a blocking command, which is a bad idea for multiple potentially large files. So I'm trying to use this, but it's still downloading 1kb files. *put* "https:" & tImgUrl into tImgUrl *set* itemdelimiter to "/" *put* item -1 of tImgUrl into tImgName *set* itemdelimiter to comma *put* tNewFolder & "/" & tImgName into tNewFile libURLDownloadToFile tImgUrl,tNewFile On Sun, Jun 4, 2017 at 8:55 AM, Matt Maier wrote: > I got bubble.is to send the base64 encoded image data instead of a link. > So just putting the base64decoded data into URL is working. > > On Sun, Jun 4, 2017 at 12:41 AM, Colin Holgate via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> Scott’s routine worked for me too. It’s worth checking where the spaces >> and returns there are in his test, I had to edit it from the email version. >> I also just tested in the multiline message box. For testing in a button, >> in LiveCode 8, you have to declare the variable as well. This was the whole >> button script: >> >> on mouseUp >> >> local theURL >> >> put "http://s3.amazonaws.com/appforest_uf/f1496548544475x1403871 >> 06221169240/grilled_cheese_on_plate.jpg" into theURL >> >> put url theURL into url ("binfile:" & specialFolderPath("desktop") & >> "/DLimage.jpg") >> >> end mouseUp >> >> >> ___ >> 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 >> > > ___ 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
stack & IDE not responding during download
Every time my script downloads an image the entire interface and IDE locks up and says "not responding" until the download finishes. I tried adding "lock screen" but that didn't help. *lock* screen *put* tImg into tDis["img_thing"] *set* the httpHeaders to "Content-Type: application/json" & cr & "Authorization: Bearer" && pToken *put* jsonfromarray(tDis) into tPayload *if* sMode is "test" *then* *post* tPayload to URL " https://howstr.bubbleapps.io/version-test/api/1.0/wf/get_img"; *else* *post* tPayload to URL "https://howstr.bubbleapps.io/api/1.0/wf/get_img"; *end* *if* *put* arrayfromjson(it) into tResponseA *put* tResponseA["response"]["image"] into tNewImage *put* tResponseA["response"]["filename"] into tNewImageName *put* base64decode(tNewImage) into url ("binfile:" & tNewFolder & "/" & tNewImageName) *unlock* screen ___ 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: how to download an image
I got bubble.is to send the base64 encoded image data instead of a link. So just putting the base64decoded data into URL is working. On Sun, Jun 4, 2017 at 12:41 AM, Colin Holgate via use-livecode < use-livecode@lists.runrev.com> wrote: > Scott’s routine worked for me too. It’s worth checking where the spaces > and returns there are in his test, I had to edit it from the email version. > I also just tested in the multiline message box. For testing in a button, > in LiveCode 8, you have to declare the variable as well. This was the whole > button script: > > on mouseUp > > local theURL > > put "http://s3.amazonaws.com/appforest_uf/f1496548544475x140387106221169 > 240/grilled_cheese_on_plate.jpg" into theURL > > put url theURL into url ("binfile:" & specialFolderPath("desktop") & > "/DLimage.jpg") > > end mouseUp > > > ___ > 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 > ___ 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: HTML5 deployment: progress comes into sight
On 06/04/2017 02:53 AM, Jonathan Lynch via use-livecode wrote: No need to loop. Set three flags to false. After each callback comes in and the flag gets switched, check all three flags. After the last ones comes in, all three flag variables will be switched and can trigger the next action. Nice. That's probably a better way to do that. -- Mark Wieder ahsoftw...@gmail.com ___ 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
Regex help...
I have a tab and cr delimited table of data, a sample line of which is below: 1Test4052,125941,4052,3,2388 The last tab delimited item "1,4052,3,2388" is actually ,,, So the starting page number is 1 and ending page is 3 I have a variable pPage which contain a page number, say "2" My regex filter, that was crafted by someone else, needs to find (filter to just) all lines starting on page 2 OR ending on page 2 OR containing page 2 (ie, pPage is >= starting page and <= ending page) My existing filter, below, matched lines with starting page number and ending page numbers but not line with page numbers between the start and end. put "(.+\t"&pPage&",\d+,\d+,\d+)|(.+\t\d+,\d+,"&pPage&",\d+)|(.+\t"&pPage&",\d*\.?\d*,\d*\.?\d*,\d*\.?\d*,\d*\.?\d*)" into tMatchPattern filter lines of tCiCData with regex pattern tMatchPattern Can someone help me revise this regex to match what I need? Thank you kindly, in advance. ___ 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: HTML5 deployment: progress comes into sight
No need to loop. Set three flags to false. After each callback comes in and the flag gets switched, check all three flags. After the last ones comes in, all three flag variables will be switched and can trigger the next action. Sent from my iPhone > On Jun 3, 2017, at 9:04 PM, Mark Wieder via use-livecode > wrote: > >> On 06/03/2017 06:38 PM, Sannyasin Brahmanathaswami via use-livecode wrote: >> >> Fascinating solution for X no of use cases, where you don't really need >> *now* , but where what you really only need is to know "exactly when and >> what" happened, even if slightly (typically, milliseconds) after the whole >> series events/statements finish > > Also for pseudo-parallel processing: > > if you have three asynchronous processes that need to finish before you can > move past a certain point in a script, you can set three flag variables to > false, then set each individually to true in its callback handler, and loop > on those three variables until they're all true or you reach a timeout. > > -- > Mark Wieder > ahsoftw...@gmail.com > > ___ > 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 ___ 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: urgent iOS internet issue (url request timeout setting?)
In this case the loss of wifi was intentional and part of a test of offline capability of our app. We do experience occasional loss of wifi on our iPads but I suspect that is down to our university’s wireless network rather than a technical issue with the devices. Terry... On 4/06/2017 11:50 am, "use-livecode on behalf of Sannyasin Brahmanathaswami via use-livecode" wrote: Not to say that TSnet bug doesn't also exist but What iOS version? your problem is an exact mirror of issues I'm having here in the shop with my iPhone 7+ and after a recent upgrade … completley unrelated to Livecode. But our netadmin keeps saying "your wireless hubs in the office look fine to us…" meanwhile I'm having that same exact experience (some others too) Wifi shows all bars some latency next moment, no wifi go for another URL in Safari… phone switchs and stays on LTE (I am standing directly infront of the hub which is connected by the ethernet) Our tech here says admin says, "Oh yeah… go to settings → General → and do a Reset Network settings… that usually fixes it." And we are wailing that there is something wrong with the Meraki (wireless) devices. could be other bad apples in the barrel besides TSnet's reuse connection issue. but maybe it is iOS? On 5/31/17, 3:44 PM, "use-livecode on behalf of Terry Judd via use-livecode" wrote: OK – I have a bit of a serious issue on iOS where if I lose wifi connectivity the first attempt to get data from a url causes problems. ___ 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 ___ 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: how to download an image
Scott’s routine worked for me too. It’s worth checking where the spaces and returns there are in his test, I had to edit it from the email version. I also just tested in the multiline message box. For testing in a button, in LiveCode 8, you have to declare the variable as well. This was the whole button script: on mouseUp local theURL put "http://s3.amazonaws.com/appforest_uf/f1496548544475x140387106221169240/grilled_cheese_on_plate.jpg"; into theURL put url theURL into url ("binfile:" & specialFolderPath("desktop") & "/DLimage.jpg") end mouseUp ___ 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