Search found 789 matches

by Thierry
Mon Apr 12, 2021 4:03 pm
Forum: Multimedia
Topic: Append an image to another image
Replies: 29
Views: 26759

Re: Append an image to another image

and now most probably what you would like to have, or close... screenshot 2021-04-12 à 16.57.21.jpg constant myDesktopFolder = "/Users/xxxx/Desktop/cards52/" constant mySourcesImages = "KH,JS,QD,AC,3H,7S,10D,2C,5H" on mergeImages local imgsIN, imgTiles, imgTilesRow local W, H, L, Nimgs, Nrows, Ncols...
by Thierry
Mon Apr 12, 2021 3:27 pm
Forum: Multimedia
Topic: Append an image to another image
Replies: 29
Views: 26759

Re: Append an image to another image

and another step... screenshot 2021-04-12 à 16.24.38.jpg on mergeImages local img0, imgsIN, imgTiles, imgTilesRow local W, H, L, N put 3 into N -- N images sources lock screen repeat with i = 1 to N local aLocalJpegFile put item i of "KH,JS,QD" into aCard put myDesktopFolder & aCard & ".jpg" into aC...
by Thierry
Mon Apr 12, 2021 2:05 pm
Forum: Multimedia
Topic: Append an image to another image
Replies: 29
Views: 26759

Re: Append an image to another image

Ok, I did move on a bit more... screenshot 2021-04-12 à 15.00.59.jpg on mergeImages local img0, imgsIN, imgTiles, W, H, L, N put 3 into N -- N images sources repeat with i = 1 to N local aLocalJpegFile put item i of "KH,JS,QD" into aCard put myDesktopFolder & aCard & ".jpg" into aCardFile set the te...
by Thierry
Mon Apr 12, 2021 11:32 am
Forum: Multimedia
Topic: Append an image to another image
Replies: 29
Views: 26759

Re: Append an image to another image

Hi Seal, I've done a quick and dirty piece of code to show you how to merge ( tile) images in 1 by script. So, that's the second solution Bernd did suggest to you. on mergeImages local img0, imgTiles, W, H, L, N put the imagedata of image "view" into img0 put the width of image "view" into W put W *...
by Thierry
Sat Apr 10, 2021 5:35 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Parsing scripts for comments
Replies: 18
Views: 8006

Re: Parsing scripts for comments

as usual you put it much more elegantly and succinctly! and after a long sleep and a nice coffee, I end up with this one-liner. Still the same regex. -- Parsing scripts for comments if sunnYreplace( fld "IN", rex, "\1", newTxt) then \ put newTxt into fld "OUT" As often, having a break after a long ...
by Thierry
Fri Apr 09, 2021 8:13 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Parsing scripts for comments
Replies: 18
Views: 8006

Re: Parsing scripts for comments

Ah, that makes sense... Hello Stam, Behind the scene, what makes sense is that we must catch strings to be able to match comments without false positives. Then the only way, AFAIK is to redirect strings patterns and comments patterns in 2 different slots. This is doable by using back references in ...
by Thierry
Thu Apr 08, 2021 5:30 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Parsing scripts for comments
Replies: 18
Views: 8006

Re: Parsing scripts for comments

This works really well and picks out all comments; but it also picks up any text within quotation marks, was this the intent? Hi Stam, Yes, that's how it works without using my sunnYrex library. This can be avoided, but only if you can manage back references in the replacement text The reason behin...
by Thierry
Thu Apr 08, 2021 10:14 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Parsing scripts for comments
Replies: 18
Views: 8006

Re: Parsing scripts for comments

I'm doing a stack that analyses text files of scripts from other stacks. What is the simplest way to detect a comment? Here is one way with regex. screenshot 2021-04-08.jpg the regex on top, the text to parse on the left and the result on the right (black bg) if sunnYmatchAll( T, rex, A, N, "both")...
by Thierry
Thu Apr 08, 2021 6:58 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Access API - "translate api example"
Replies: 10
Views: 5179

Re: Access API - "translate api example"

Well, it looks like I am on the verge of learning something new. I REALLY appreciate all of your help! You're welcome Poco :) So, that's a good feeling, no? At least, I enjoy these moments... I spent a good deal of time with the api documentation but my mistaken assumption caused me to miss that im...
by Thierry
Wed Apr 07, 2021 5:00 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Access API - "translate api example"
Replies: 10
Views: 5179

Re: Access API - "translate api example"

But I also tried submitting the parameters via a post request (using a method called "getViaPost"). Unfortunately, that returns a "404 Not Found" error. I do not know why. Hi Poco, all the samples, including the curl command, are using a GET in the docs. What's telling you that the POST is part of ...
by Thierry
Wed Apr 07, 2021 8:28 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Access API - "translate api example"
Replies: 10
Views: 5179

Re: Access API - "translate api example"

Hi again, Actually, we can test most of the API, even without a key. Now, I can tell you I'm quite confident that it should work with a valid Key. So, running this code: ........... put url fullUrl into iAmRich if the result is empty then put JSONtoArray(iAmRich) into tableValues set the arraydata o...
by Thierry
Wed Apr 07, 2021 7:24 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Access API - "translate api example"
Replies: 10
Views: 5179

Re: Access API - "translate api example"

Thank you both, Thierry & MrCoolLion!!! Thierry: I like your approach because I do not have to use the Indy version (which I may not have much longer). But I cannot get the POST command working. Hi Poco, It's a bit difficult to help you without seeing *how* you did code your solution. Much better t...
by Thierry
Tue Apr 06, 2021 7:13 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Access API - "translate api example"
Replies: 10
Views: 5179

Re: Access API - "translate api example"

Hi Poco, Let me believe this could help you: You'll find a working curl command with some parameters: get shell("curl -X POST https://textbelt.com/text --data-urlencode phone='18001234' --data-urlencode message='Hello world' -d key=textbelt") and I did translated it to a POST livecode command only. ...
by Thierry
Mon Apr 05, 2021 12:13 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Find text between two different delimiters/tags using Regex
Replies: 14
Views: 8909

Re: Find text between two different delimiters/tags using Regex

SparkOut wrote:
Sat Apr 03, 2021 6:21 pm
*I don't need to link the xkcd strip again do I?

Edit: Oh alright then ...
Hi SparkOut, funny but that's an old story and only one side of the play :)

So, look at what was happening after that:

tarzan-liane.gif
(click the gif to see it in action...)

Happy Easter,

Thierry
by Thierry
Mon Apr 05, 2021 12:05 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Parsing scripts for comments
Replies: 18
Views: 8006

Re: Parsing scripts for comments

I'm sure Thierry could make a regex - but I'm not sure I could understand it :D 8-)
Then, what's the use to make one? :roll:
Regex can do anything. I never use it.
Almost my friend, almost... :wink:


Happy Easter,

Thierry

Go to advanced search