Re: SSL cPanel mySql setup

2020-10-19 Thread Thierry Douez via use-livecode


> Le 19 oct. 2020 à 08:45, Dev via use-livecode  
> a écrit :
> 
> Since I have been on DreamHost for more than a decade, I would love to have 
> something like this set up. I’m not too proficient with Terminal or Linux, 
> but can follow instructions. I would love to know if there is a crib sheet or 
> step by step or tutorial that I could follow to get an instance running in my 
> space?
> 
> Thanks for any information that you can point me to.

Hi,

AxWald is talking about this topic here:

https://forums.livecode.com/viewtopic.php?f=15=34068 



and it just works!

Kind regards,

Thierry

___
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: Wildcard? replaceText, offset?

2020-04-27 Thread Thierry Douez via use-livecode


> Le 27 avr. 2020 à 08:37, J. Landman Gay via use-livecode 
>  a écrit :
> 
> On 4/26/20 1:24 PM, Rick Harrison via use-livecode wrote:
>> In the middle-end part of the string I have “(x)” where x represents some 
>> integer.
>> it could be (4) or (10) or (5) etc.
>> I just want to replace the number inside the () with whatever other number I 
>> need to.
> 


   local T = "a(1)(z)(345)xxx(567Z33)(666)"

   if  sunnYreplace( T, "\((\d+)\)",  "(42)",  Tr ) then   put Tr

   --> a(42)(z)(42)xxx(567Z33)(42)



Thanks to check https://sunny-tdz.com/livecode/sunnyrex 


Thierry

___
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: Groups placed on cards

2020-04-25 Thread Thierry Douez via use-livecode

> Le 25 avr. 2020 à 02:22, Peter Bogdanoff  a écrit :
> 
> In testing with a new stack, I see that what I am asking for actually does 
> happen.
> The various placements of the group do  have the same ID and configuration.

> So, I’ll work with my stack to make it happen that way.


Hi Peter,

This happened to me a couple of years ago which an old stack being updated to 
new LC format
I've lost all those standard group behaviour... I deleted them from all cards 
and redo.
Unfortunately, don't remember the full details.

Good luck,

Thierry


___
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: numberformat woes?

2019-11-07 Thread Thierry Douez via use-livecode
Hallo Klaus,

Umm, thinking loudly, I would say numberformat has a local scope ...


Regards,

Thierry

What am I missing?
>
> Klaus

-- 
----
Thierry Douez - sunny-tdz.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: sysError values...

2019-01-30 Thread Thierry Douez via use-livecode
Here is another place for MacOS system errors:

https://www.macheat.com/general-error-codes-for-os-x

most probably doesn't list all errors...

Thierry Douez
 sunny-tdz.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: Replacetext taking forever under 8.1.7

2017-11-28 Thread Thierry Douez via use-livecode
2017-11-23 21:27 GMT+01:00 Bruce Pokras via use-livecode <
use-livecode@lists.runrev.com>:

>
> put replacetext(holdIt1,"[ ]{2,10}",empty) into holdIt
>
> Under 8.1.7 I get the dreaded spinning beachball, although the replacetext
> action eventually finishes (after 20 minutes), and the script then runs to
> completion.
>
> Any ideas about causes and cures for this issue?
>

​Yes, I have one...​

​from memory:​

​the latest LC version which should work fine is 8.1.2 (stable)

this bug was introduced when upgrading the PCRE lib from 8.33 to 8.39

​
Of course, better to check if what I'm saying is right
as yesterday I was travelling all night :)


Kind regards,

Thierry



-- 
--------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: [OT] Alternative to Inkscape

2017-10-05 Thread Thierry Douez via use-livecode
2017-10-05 1:44 GMT+02:00 Alejandro Tejada
​:

I use Xara since many, many years ago. Their technical support is excellent
> and rarely (if ever) I had a problem with their application
> except a rare bug that I found, reported and they fixed.
>

​Since a couple of years, I have a graphic designer who works with Xara
(Win10) and
I adapt his works with Affinity Designer (MacOS)​. We can exchange our SVG
jobs
quite easily, and for me, not being a graphic designer at all, I find this
process easy enough.

Regards,

Thierry

-- 
----
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: OT: recommendations for Installer Maker

2017-09-20 Thread Thierry Douez via use-livecode
Hallo Tiemo,

I believe Mark has a good time on the beach :)

If I remember well, he said few days ago that his company will be closed
for holidays.

Kind regards,

Thierry



2017-09-20 9:22 GMT+02:00 Tiemo Hollmann TB
​
:

> Hello,
>
> I am using Installer Maker, version 1.8.7 from Mark S. on Mac.

This version
> ​ ​
> is not LC 8 compatible.

I don't get any responses on requests anymore from
> him (perhaps it's only me?).

Does anybody is in contact with him or knows,
>


-- 
--------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: [tsNet] tsNetSmtpSync

2017-09-17 Thread Thierry Douez via use-livecode
2017-09-15 10:57 GMT+02:00 Charles Warwick
​
:

Hi Thierry,
>
> On 15/09/2017 6:31 PM, Thierry Douez:
>
>> Hi all,
>>
>> I've worked hard with tsNetSmtpSync() these last days,
>> on macOS Sierra with the latest LC 8.1.6
>> and have 2 questions which bothers me:
>>
>> - from time to time (no recipe yet), I've got an error when executing it.
>> Executing it again (same code and context) and all is fine then.
>>
>
> What is the error message that you get?
>
>

​Charles,
​

​Finally, after a couple of hundred  positive tests,
 the error came back:​

Error tsneterr: (56) SSLRead() return error -9806

​Sending  again the same mail a second later in same context works​.

Kind regards,

Thierry

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: [tsNet] tsNetSmtpSync

2017-09-15 Thread Thierry Douez via use-livecode
2017-09-15 17:35 GMT+02:00 Thierry Douez <th.do...@gmail.com>:

>
>
> 2017-09-15 17:29 GMT+02:00 Bob Sneidar :
>
>> Spoke too soon those are the actual WORDS username and password, base64
>> encoded, but some of the chars are not plain ascii not sure why.
>>
>> Bob S
>>
>
> ​:)
>

​Ok, I've done a quick test with the right datas:

put base64De​code( "the334value")
and I can see the plain text username  and password,
nothing more.

So, I'm safe and breathing again :)


> Because​ I've typed silly character in these datas before posting :)
>
> Your email scarred me first so I forgot I did this :)
>
> Anyway, thanks again as I'm not familiar with this protocol.
>
> Regards,
>
> Thierry
>

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: [tsNet] tsNetSmtpSync

2017-09-15 Thread Thierry Douez via use-livecode
2017-09-15 17:29 GMT+02:00 Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com>:

> Spoke too soon those are the actual WORDS username and password, base64
> encoded, but some of the chars are not plain ascii not sure why.
>
> Bob S
>

​:)

Because​ I've typed silly character in these datas before posting :)

Your email scarred me first so I forgot I did this :)

Anyway, thanks again as I'm not familiar with this protocol.

Regards,

Thierry



>
> > On Sep 15, 2017, at 08:05 , Thierry Douez via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> >> BTW you should mask the 334 entries as these are only base64 encoded
> user
> >> and password. I could look it up and tell you what they are right now.
> >>
> >> Bob S
>
-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: [tsNet] tsNetSmtpSync

2017-09-15 Thread Thierry Douez via use-livecode
2017-09-15 16:40 GMT+02:00 Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com>:

> BTW you should mask the 334 entries as these are only base64 encoded user
> and password. I could look it up and tell you what they are right now.
>
> Bob S


​Oops, thanks​.

Did change everything on the server !

Thanks again :)

Thierry


--------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: [tsNet] tsNetSmtpSync

2017-09-15 Thread Thierry Douez via use-livecode
2017-09-15 11:19 GMT+02:00 Charles Warwick :

> Hi Theirry,
>
> On 15/09/2017 7:08 PM, Thierry Douez wrote:
>
>> ​I guess both methods are safe?
>> or is there some advantages with one or the other?
>>
>> I'm using it within a Livecode Mail Composer.
>> Based on an export of my server DB, I'm scanning some address,
>> build dynamically the html-email and send one by one all emails.
>> ​
>>
>
> Both are safe.  Generally, if you are going to be making multiple
> connections to the same server (in this case, sending a number of e-mails)
> fairly quickly, then allowing tsNet to reuse an existing SSL/TLS connection
> to the server will be quicker (it doesn't have to establish the SSL
> connection each time).
>
>
​Good to know what's behind the scene,
thanks again.

your SMTP external is a great feature !

Thierry


-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: [tsNet] tsNetSmtpSync

2017-09-15 Thread Thierry Douez via use-livecode
2017-09-15 10:57 GMT+02:00 Charles Warwick

Hi Thierry,
>
> On 15/09/2017 6:31 PM, Thierry Douez:
>
>> Hi all,
>>
>> I've worked hard with tsNetSmtpSync() these last days,
>> on macOS Sierra with the latest LC 8.1.6
>> and have 2 questions which bothers me:
>>
>> - from time to time (no recipe yet), I've got an error when executing it.
>> Executing it again (same code and context) and all is fine then.
>>
>
> What is the error message that you get?




​Mmm, of course,  I should have read the error number :)
Will post back with other tests a bit later...
​

>
>
> - about the ResponseHeaders out parameter:
>>
> tsNet will try re-use an existing connection if there is one available, so
> this first example:
>
> Sometimes I get:
>>
>> 220-xxx..net ESMTP Exim 4.89 #1 Thu, 14 Sep 2017 14:17:38 +0200
>> 220-We do not authorize the use of this system to transport unsolicited,
>> 220
>> ​
>>
>> 250 OK id=1dsT5O-002hrt-TA
>>
>

> Indicates that there was no existing SMTP connection to the server, so it
> needed to establish a new connection.
>
> Where in the following example:
>>
>> 250 OK
>> 250 Accepted
>> 250 Accepted
>> 354 Enter message, ending with "." on a line by itself
>> 250 OK id=1dsSmD-003WQr-2l
>>
>

> This indicates that tsNet found an existing SMTP connection to the server
> you are connecting to, so could just send the message across the already
> open connection. ​

You can add the "no_reuse" element with a value of true to the settings
> array (last parameter to tsNetSmtpSync) if you want to establish a fresh
> connection for each e-mail that is sent rather than allowing tsNet to reuse
> an existing connection.
>

​I guess both methods are safe?
or is there some advantages with one or the other?

I'm using it within a Livecode Mail Composer.
Based on an export of my server DB, I'm scanning some address,
build dynamically the html-email and send one by one all emails.
​

>
> Hope that helps,
>


​Thanks Charles for your  explanations, much appreciated.


Regards,

Thierry



> In both cases, the email is sent and received correctly.
>>
>> Thanks for some hints.
>>
>> Thierry
>>
>>
-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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

[tsNet] tsNetSmtpSync

2017-09-15 Thread Thierry Douez via use-livecode
Hi all,

I've worked hard with tsNetSmtpSync() these last days,
on macOS Sierra with the latest LC 8.1.6
and have 2 questions which bothers me:

- from time to time (no recipe yet), I've got an error when executing it.
Executing it again (same code and context) and all is fine then.



- about the ResponseHeaders out parameter:

Sometimes I get:

220-xxx..net ESMTP Exim 4.89 #1 Thu, 14 Sep 2017 14:17:38 +0200
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
250-xxx..net Hello z [99.33.77.88]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
220 TLS go ahead
250-xxx..net Hello pommeDesFouets [99.33.77.88]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
334 VXNlfg5hbWU6
334 UGFzc3sdfcmQ6
235 Authentication succeeded
250 OK
250 Accepted
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=1dsT5O-002hrt-TA

or this:

250 OK
250 Accepted
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=1dsSmD-003WQr-2l

In both cases, the email is sent and received correctly.

Thanks for some hints.

Thierry


-- 
--------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Livecode docset for Dash

2017-09-12 Thread Thierry Douez via use-livecode
Hi James,

To express my appreciation of your astonishing tool and work,
 I'm offering you a free license of sunnYrex
<https://sunny-tdz.com/livecode/sunnyrex> !

 I'll send it to you on your private email.

Hope you'll like it.

Kind regards,

Thierry




2017-09-12 10:37 GMT+02:00 James Hale via use-livecode <
use-livecode@lists.runrev.com>:

> New version of "Make DocSet" uploaded.
>
> Changes in version 1.1
>
> • LC icon added.
> • Table of contents added for Guides.
>   They will appear in the left pane when viewing a guide.
>
> James
>
>
>
>
> ___
> 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
>



-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Missing things in the holidays

2017-09-02 Thread Thierry Douez via use-livecode
Here is the reason:

> On Aug 31, 2017, at 3:42 AM, panagiotis merakos via use-livecode <
use-livecode@lists.runrev.com> wrote:
>
> Hi all,
>
> Since the week beginning 21st August 2017, LiveCode iOS apps are being
> rejected by iTunes Connect due to 'invalid binary'. It turns out that
Apple
> have upgraded the tools they use to analyse binaries, and this has shown
an
> error in the Mach-O structure of the 64-bit slice. The version of otool
> with Xcode 6.x (on 10.9) does not show a problem, but newer versions do.
>
> For this reason, we have built a new version of LiveCode 8.1.6 that
> addresses this issue.
>
> So if you have already installed the original LiveCode 8.1.6 and are
> affected by this issue, please visit now
>
> http://downloads.livecode.com/livecode/
>
> and download the latest 8.1.6 (STABLE), released on the 31st of August.
>
> Best regards,
> The LiveCode Team



2017-09-02 8:46 GMT+02:00 Richmond Mathewson via use-livecode <
use-livecode@lists.runrev.com>:

> I did:
>
> Came back and found a second version of the 'stable' 8.1.6 . . .
>
> But could not find out why, what and so on . . .
>
> Richmond.
> ___
> 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
>



-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: common code patterns

2017-08-11 Thread Thierry Douez via use-livecode
2017-08-11 9:07 GMT+02:00 J. Landman Gay:

On 8/10/17 7:42 PM, Monte Goulding:
>


> Over on the Parent of Target thread we are discussing local var access so
>> I wonder if this is a useful common pattern:
>>
>> local s
>>
>> command set p
>> put p into s
>> end set
>>
>> function get
>> return s
>> end get
>>
>
> Yes, I use that a lot.
>
>

+1


-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Taking quotes on building LC external for RethinkDB

2017-08-04 Thread Thierry Douez via use-livecode
2017-08-03 17:00 GMT+02:00 Bob Sneidar:

I poked around on their web site.

What is the advantage of this db over other SQL db's? Price? Speed? Ease of
> config?
>
>

​Hi Bob,

Here is 1 minute of rethinkDB​...

https://www.youtube.com/watch?v=qKPKsBNw604


Regards,

Thierry




> > On Aug 2, 2017, at 14:12 , Tom Glod via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi folks, my company is currently taking quotes on building an LC
> external
> > to act as a driver for RethinkDB.  I have already submitted a request
> with
> > Monte & Ian over at Livecode, but would like to open it up to everyone
> that
> > has the skill to build the externalI don't really even know if there
> is
> > anyone else.
> >
> > Here are the exact specs.
> >
> > https://www.rethinkdb.com/docs/writing-drivers/
> >
> > The more precise the quote the better.
> >
> > Thanks,
> >
> > Tom
>
>
-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Parsing (scraping) OpenGraph Tags from html HEAD

2017-08-02 Thread Thierry Douez via use-livecode
2017-08-02 17:54 GMT+02:00 Sannyasin Brahmanathaswami via use-livecode <
use-livecode@lists.runrev.com>:

> Responding on top
>
> Jacque's method only gets us a  list, not an array, so one ends up having
> to write more code to parse the list anyway, your method is more efficient.
>
> "not comfortable with RegEx"  Ha,, right. but it worth the effort to keep
> the little grey cells green! I will have to study the regEx… things like ?ms
> are "brand new" to me.
>

​So, you win your first Regex training :)

(?ms) are regex options.

m means multi-lines
s means the dot ( '.' ) could also match a return/cr/lf char.

​

>
>
> re: extracting the head first: I was under the impression your repeat loop
> would have to work through the entire text of _HTML unnecessarily and that
> extracting the heads would reduce processing time.



​Well, you are right:
 but only when the regex will try to match after the last valid pattern.

What is most costly is the delete inside the loop; so working only with the
... of your html might be more efficient in this case. But
this is more a LC thing.


​

> OTOH, Andre tells me that for this kind of operation, even cell phones
> have CPU's that are more powerful than some desktop machines and so perhaps
> the time to loop through the entire html source is too trivial to consider
> at all.
>

​Yep, as I said, only after the last match, the regex will loop through the
end
of the html and only one time. About quality concerns, restricting the
regex to the  part is a good idea as you never know what could be
some html in the future...

​

>
> Thanks for the effort you put into this.


You're welcome.

Kind regards,

Thierry



We are adding OG tags to all the media on our web site (eventually) and our
> apps will need to parse that out in various contexts.
>
> BR
>
>
>
>
>
> On 8/1/17, 10:07 PM, "use-livecode on behalf of Thierry Douez via
> use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of
> use-livecode@lists.runrev.com> wrote:
>
> 2017-08-02 6:45 GMT+02:00 Sannyasin Brahmanathaswami:
>
>
> ​Hi Brahmanathaswami,
> ​
>
> Thanks Thierry
> >
> > though I'm yet sure when using regEx this is better than using
> Jacque's
> > method
> >
>
> ​That's 2 different ways..
> but with the regex one, you have the exact key and value of each tags,
> nothing more to do.​
>
>
> Either way it would seem prudent to extract the head first before
> processing
> >
>
> ​Mmm, don't really see why, but I've added a line of code for this too
> below.
>
> ​
>
> >
> > Using jacques method just gets the list..
>
> and we need to do more coding to get the array we need.
> >
> > But your method can only handle 1 tag.
> >
>
>
> ​I was aware of that but didn't know what you want to achieve,
> therefore I
> leave it for the reader.
> However this has nothing to do with the regex but with the code inside
> the
> repeat loop.
>
>
> Here is another way to do it, changing only *1* line of code inside
> the loop
> with the same regex as before:
>
>
>
>   -- to please BR wishes, but not necessary
>   -- erase everything after 
>put replaceText( _Html, "(?ms).*?$", empty) into _Html
>
>repeat while matchChunk( _Html, Rx, p1,p2,p3,p4 )
>   put  char p1 to p2 of _Html & tab& char p3 to p4 of _Html  
> after
> Rslt
>   delete char 1 to p4 of _Html
>end repeat
>delete last char of Rslt -- extra cr
>
>put Rslt into fld 1
>answer "Got " & the number of lines of Rslt & " og: meta tags!"
>
>
> Building a multi-dimensionnal array after the extraction,
>     a bit more work inside the repeat loop will be needed,
> but  the extraction part is still valid.
> ​
>
> ​
>
> Finally, if you are not at ease with regex, go with Jacque's way and
> everything will be fine.
> There are fundamentally not much differences in between the 2 ways.
>
>
> Kind regards,
>
> Thierry
>
>
>
>
>
>
> > On 7/31/17, 12:31 AM, "use-livecode on behalf of Thierry Douez wrote:
> >
> > So, here is the code:
> >
> >local Rx, Rslt, _Html, OG
> >
> >put empty into Rslt
> >put URL "https://www.youtube.com/user/kauaiaadheenam; into
> _Html
> >
> >get
> > "(?ms)<meta\s+property=\x{22}og:(.+?)\x{

Re: Parsing (scraping) OpenGraph Tags from html HEAD

2017-08-02 Thread Thierry Douez via use-livecode
2017-08-02 6:45 GMT+02:00 Sannyasin Brahmanathaswami:


​Hi Brahmanathaswami,
​

Thanks Thierry
>
> though I'm yet sure when using regEx this is better than using Jacque's
> method
>

​That's 2 different ways..
but with the regex one, you have the exact key and value of each tags,
nothing more to do.​


Either way it would seem prudent to extract the head first before processing
>

​Mmm, don't really see why, but I've added a line of code for this too
below.

​

>
> Using jacques method just gets the list..

and we need to do more coding to get the array we need.
>
> But your method can only handle 1 tag.
>


​I was aware of that but didn't know what you want to achieve, therefore I
leave it for the reader.
However this has nothing to do with the regex but with the code inside the
repeat loop.


Here is another way to do it, changing only *1* line of code inside the loop
with the same regex as before:



  -- to please BR wishes, but not necessary
  -- erase everything after 
   put replaceText( _Html, "(?ms).*?$", empty) into _Html

   repeat while matchChunk( _Html, Rx, p1,p2,p3,p4 )
  put  char p1 to p2 of _Html & tab& char p3 to p4 of _Html   after
Rslt
  delete char 1 to p4 of _Html
   end repeat
   delete last char of Rslt -- extra cr

   put Rslt into fld 1
   answer "Got " & the number of lines of Rslt & " og: meta tags!"


Building a multi-dimensionnal array after the extraction,
a bit more work inside the repeat loop will be needed,
but  the extraction part is still valid.
​

​

Finally, if you are not at ease with regex, go with Jacque's way and
everything will be fine.
There are fundamentally not much differences in between the 2 ways.


Kind regards,

Thierry






> On 7/31/17, 12:31 AM, "use-livecode on behalf of Thierry Douez wrote:
>
> So, here is the code:
>
>local Rx, Rslt, _Html, OG
>
>put empty into Rslt
>put URL "https://www.youtube.com/user/kauaiaadheenam; into _Html
>
>get
> "(?ms)<meta\s+property=\x{22}og:(.+?)\x{22}\s+content=\x{
> 22}(.+?)\x{22}>"
>put IT into Rx
>
>repeat while matchChunk( _Html, Rx,p1,p2,p3,p4 )
>   put  char p3 to p4 of _Html  into OG[  char p1 to p2 of _Html ]
>   delete char 1 to p4 of _Html
>end repeat
>
>
>
> and you can test it this way:
>
>combine OG using return and ":"
>put OG into fld 1
>
>
>
> HTH and feel free to ask any question...
>
> Kind regards,
>
> Thierry
>


-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Parsing (scraping) OpenGraph Tags from html HEAD

2017-07-31 Thread Thierry Douez via use-livecode
2017-07-29 22:16 GMT+02:00 Sannyasin Brahmanathaswami
​
:


> you want to extract from the  of the document  the openGraph  tags
>
> 
> https://www.youtube.
> com/user/kauaiaadheenam">
> 
> https://yt3.ggpht.
> com/-p766LczvKHY/AAI/AAA/SIu6ZAJbMDc/s900-
> c-k-no-mo-rj-c0xff/photo.jpg">
> 
>
> c) you also cannot depend on the output being line delimited, because some
> CMS's delivery "agents" will minimize this to
>
>  content="https://www.youtube.com/user/kauaiaadheenam;> property="og:title" content="Kauai's Hindu Monastery"> property="og:image" content="https://yt3.ggpht.
> com/-p766LczvKHY/AAI/AAA/SIu6ZAJbMDc/s900-
> c-k-no-mo-rj-c0xff/photo.jpg"> content="{where hinduism meets the future}">
>
> Has anyone rolled up a parser/scraper for this?

Looks like "idiot simple text extraction"



​Hi,

Here is a quick coded piece of code, tested only on your URL.
I did write this regex based on the Datas you provide in your email.
​

>

I see the other thread on scraping pages generated by JS and suspect
> perhaps some wizard among us already has this done…would save a bit of time
> here.
>
> BR
>

​Every time you see any kind of scraping/search/extraction/transformation
in JS, you can be sure
it's possible to do it in LiveCode​

So, here is the code:

   local Rx, Rslt, _Html, OG

   put empty into Rslt
   put URL "https://www.youtube.com/user/kauaiaadheenam; into _Html

   get
"(?ms)<meta\s+property=\x{22}og:(.+?)\x{22}\s+content=\x{22}(.+?)\x{22}>"
   put IT into Rx

   repeat while matchChunk( _Html, Rx,p1,p2,p3,p4 )
  put  char p3 to p4 of _Html  into OG[  char p1 to p2 of _Html ]
  delete char 1 to p4 of _Html
   end repeat



and you can test it this way:

   combine OG using return and ":"
   put OG into fld 1





HTH and feel free to ask any question...

Kind regards,

Thierry

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Find some text characters

2017-07-17 Thread Thierry Douez via use-livecode
2017-07-18 6:31 GMT+02:00 Peter Bogdanoff via use-livecode <
use-livecode@lists.runrev.com>:

> Thierry, I ended up using your first Regex example—works great!
>
> It is very good to know about \p{} matches—everything from Arabic to Yi.

That may come in handy later.
>
> Thanks,
>
> Peter
>
>
​Glad that you like it :)
​

> >> function testForChinese T
> >> ​xt​
> >> ​ -- any htmltext​
> >>   return matchText(
> >> ​Txt
> >> , "

Re: Find some text characters

2017-07-17 Thread Thierry Douez via use-livecode
2017-07-18 3:53 GMT+02:00 Thierry Douez <th.do...@gmail.com>:

>
>> I want to know if this data contains Chinese characters
>>
>> Thanks for suggestions!
>>
>> Peter Bogdanoff
>>
>>
> ​Hi Peter,
>


​Ok, back after my second morning coffee :)

A better way to check for Chinese code points would be
something like that (not tested and never used myself) :


function testForChinese utf8Text
   return matchText( utf8Text, "\p{Han}")
end testForChinese

Of course, it won't work with  htmlText, but straight with
the text of a field, assuming it's coded in UTF8 !!!


HTH,

Thierry
​

> ​
> ​Mmm, not sure you'll get *only* Chinese characters,
> but at least any entity with only 5 numbers.
>
> This function returns true if find any, false otherwise:
> ​
> function testForChinese T
> ​xt​
> ​ -- any htmltext​
>return matchText(
> ​Txt
> , "
<

Re: Find some text characters

2017-07-17 Thread Thierry Douez via use-livecode
2017-07-17 23:40 GMT+02:00 Peter Bogdanoff via use-livecode <
use-livecode@lists.runrev.com>:

> Is there a easy way to do this?:
>
> Given this htmlText that may contain Chinese characters and/or some
> horizontal tabs—
>
> 
>
> I want to know if this data contains Chinese characters, that is an entity
> with 5 numbers between the “#” and the “;”
>
> Only data containing 5 numbers between the “#” and the “;” would return
> true. Having ONLY "” but not the other would return false.
>
> Thanks for suggestions!
>
> Peter Bogdanoff
>
>
​Hi Peter,
​

​Mmm, not sure you'll get *only* Chinese characters,
but at least any entity with only 5 numbers.

This function returns true if find any, false otherwise:
​
function testForChinese T
​xt​
​ -- any htmltext​
   return matchText(
​Txt
, "

Re: Crashing when I try to make a Mac standalone

2017-07-06 Thread Thierry Douez via use-livecode
2017-07-06 8:54 GMT+02:00 Jonathan Lynch:

> Following up - it seems to create the standalone and then crash.


> Sent from my iPhone
>
> > On Jul 6, 2017, at 2:46 AM, jonathandly...@gmail.com wrote:
> >
> > When I try to make a standalone for Mac in version 8.1.5 RC 2
>
it crashes at the moment where it tries to include externals.
>
>
Just a guess; might be RC 3 would help...


Regards,

Thierry​

-- 
--------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Advice on copying and pasting in mobile

2017-07-03 Thread Thierry Douez via use-livecode
2017-07-02 14:54 GMT+02:00 Jonathan Lynch
​
:

Hello,
>
> I really need to be able to paste text in an LC field on mobile.
>
> I can do it for iOS with the sunny text to speech external,



​Great!

​

> but that external has an audio message that comes on when the app first
> opens
> ​...
>


This audio message is telling you that you have a Trial-Demo version
of sunnYtext2speech external.

There is *no audio message with the licensed one*!

This is the only difference between the Trial and the licensed version.

Regards,

Thierry


> --
--------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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 do we access the clipboard on mobile devices?

2017-06-28 Thread Thierry Douez via use-livecode
J. Landman Gay
​:
​

They can paste text normally if you use a native field. The only
> restriction is that LC can't manage the clipboard through script alone. But
> if you create a mobile field the OS handles it as expected.
>
> In other words, copy and paste is currently limited to manual user actions.
>
>
>
>>> It would be very nice to be able to get and set the rawClipboardData on
>>> mobile but that is only possible on the desktop.
>>>
>>

On my latest release of sunnYtext2speech, I did add an experimental
copy and paste commands.

Contact me off-list if any interest.

Kind regards,

Thierry

-- 
----
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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...

2017-06-05 Thread Thierry Douez via use-livecode
@Paul,
to defend you, it's not always so obvious to know what we can or cannot do
with regex.


@Mike
yes, Perl is great and that's certainly why I have embeded Perl in
LiveCode, Mmm, more than 10 years ago.

I've also helped some well known LiveCoders to do some complex
transformation with Perl where
they were lost in pure LiveCode script; but this is another story.

By the way, there is a not free LiveCode library called sunnYrex which
accepts LiveCode script inside
the replacement text.. pretty cool too but not useful in Paul use case.

Kind regards,

Thierry



2017-06-05 15:23 GMT+02:00 Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com>:

> Thank you Thierry and everyone else.
>
> I should have realized that I couldn't do this entirely with regex due
> to the need to compare the number values. It was a long day yesterday
> and my brain just wasn't in full gear.
>
> -- Paul
>
>
> On 6/5/2017 4:06 AM, Thierry Douez via use-livecode wrote:
> > Hi Paul,
> >
> >
> > AFAIK you need to deal with an hybrid approach (regex + livecode)
> >
> > So, here is one way to do it:
> >
> >
> >put 3 into pPage
> >
> >repeat for each line T in tCiCData
> >
> >   if matchText( T, "(?x) \t (\d+) , \d+ ,  (\d+)  , \d+ \z", n1, n2)
> > then
> >
> >   if (n1 <= pPage) and (n2 >= pPage) then
> >
> >   put T & cr after tCiCfilteredData
> >
> >   end if
> >
> >   end if
> >
> >end repeat
> >
> >put tCiCfilteredData
> >
> >
> > But for the curious with an open-mind here is another solution:
> >
> >
> >get "perl -ne 'print if /\t(\d+),\d+,(\d+),\d+$(?(?{$1>PP ||
> > $2<PP})(*FAIL))/'"
> >
> >get replaceText( IT, "PP", pPage)
> >
> >put shell( IT && "/your/path/CiCData.txt")
> >
> > What? the regex do the comparison!
> > Well yes and no; in Perl we can embed Perl code *inside* the regex,
> > like: (?{$1>PP || $2<PP})
> >
> > $1>PP || $2 >
> > As we have a mixture of a regex pattern and some perl code;
> > that is in fact another hybrid solution.
> >
> >
> > And of course, you can do it  using only chunks , item and so on...
> >
> > Have fun,
> >
> > Thierry
> >
> >
> > 2017-06-04 17:35 GMT+02:00 Paul Dupuis via use-livecode <
> > use-livecode@lists.runrev.com>:
> >
> >> I have a tab and cr delimited table of data, a sample line of which is
> >> below:
> >>
> >> 1Test4052,125941,4052,3,2388
> >>
> >> Can someone help me revise this regex to match what I need?
> >>
> >> Thank you kindly, in advance.
> >>
>

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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...

2017-06-05 Thread Thierry Douez via use-livecode
Hi Paul,


AFAIK you need to deal with an hybrid approach (regex + livecode)

So, here is one way to do it:


   put 3 into pPage

   repeat for each line T in tCiCData

  if matchText( T, "(?x) \t (\d+) , \d+ ,  (\d+)  , \d+ \z", n1, n2)
then

  if (n1 <= pPage) and (n2 >= pPage) then

  put T & cr after tCiCfilteredData

  end if

  end if

   end repeat

   put tCiCfilteredData


But for the curious with an open-mind here is another solution:


   get "perl -ne 'print if /\t(\d+),\d+,(\d+),\d+$(?(?{$1>PP ||
$2<PP})(*FAIL))/'"

   get replaceText( IT, "PP", pPage)

   put shell( IT && "/your/path/CiCData.txt")


What? the regex do the comparison!
Well yes and no; in Perl we can embed Perl code *inside* the regex,
like: (?{$1>PP || $2<PP})

$1>PP || $2:

> I have a tab and cr delimited table of data, a sample line of which is
> below:
>
> 1Test4052,125941,4052,3,2388
>
> Can someone help me revise this regex to match what I need?
>
> Thank you kindly, in advance.
>

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Sort so that "Hello" is always before "hello"

2017-05-19 Thread Thierry Douez via use-livecode
​Hallo Hermann,
​

>
>> sort lines of T numeric by each & AaZz_sort( each) ?
>> sort lines of T
>>
>> Else the container is sorted by the first char of each line only.
>>
>
>
​Ok, I can't find a way to do it with a single sort.

Therefore your solution 1st or mine adding a
second sort after it.

Enjoy your week-ed,

Thierry
​

​Yes, you are right, so I rewrite it a bit to be more *readable*:
>
>
> sort lines of T numeric by AaZz_sort(char 1 of each)
>
> function AaZz_sort x
>get chartonum( x)
>if IT > 96 then return ( IT - 96) * 2 + 1
>else return ( IT - 64) * 2
> end AaZz_sort
> ​
>

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-19 Thread Thierry Douez via use-livecode
​

Is there life without internet for one week?

- lucky you are connected to the world again!
> Tiemo
>

​Hallo Tiemo,

Except some hurdles with the administration ( sold my old car and bought a
new one) plus being insulted by a couple of stressed and egotist people for
not answering sooner,
I did use this time to clean my garden,
did some house construction and enjoyed
to talk longer with friends in the city :)

But I'll have to work all the week-end now :)

Kind regards,

Thierry
​

> >
> >> put "1 [A] 2 [B] 3." into tText
> >> put  removeBrackets( tText)
> >>
> >
> > I see that the middle section is omitted with my regex, so I forgot to
> > make it non-greedy. But I've forgotten how to do that, something about
> > a question mark, I think?
>
>
> ​Sorry about the delay, we had a thunderstorm which broke all Internet
> network in our area since last Friday.
>
> You can do this in 2 ways:
>
> - make your .* non greedy by adding a '?' suffix
>
> - or modify your regex this way:
>
>"\[ [^\]]*]" which means looking for an open bracket followed by zero
> to any number of chars which are not a close bracket, and last a close
> bracket.
> BTW, no need to escape the last closing bracket; the regex engine is smart
> enough.
>
>
> PCRE library accepts the 2 forms.
>
> HTH,
>
> Thierry
>  ​
>

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Sort so that "Hello" is always before "hello"

2017-05-19 Thread Thierry Douez via use-livecode
2017-05-19 15:44 GMT+02:00 hh
​:

> Thierry wrote:
> > sort lines of T numeric by AaZz_sort( each)
> > function AaZz_sort x
> >get chartonum( char 1 of x)
> >if IT > 96 then return ( IT - 96) * 2 + 1
> >else return ( IT - 64) * 2
> > end AaZz_sort
>
>
> Hi Thierry,
>
> don't you need a second sort as 'primary' sort?
>

​Mmm, no ?
I thought that was the question from the OP... misreading  :)
​

>
> sort lines of T numeric by each & AaZz_sort( each) ?
> sort lines of T
>
> Else the container is sorted by the first char of each line only.
>

​Yes, you are right, so I rewrite it a bit to be more *readable*:


sort lines of T numeric by AaZz_sort(char 1 of each)

function AaZz_sort x
   get chartonum( x)
   if IT > 96 then return ( IT - 96) * 2 + 1
   else return ( IT - 64) * 2
end AaZz_sort
​


> But your ASCII-number-formula for uppercase/lowercase A-Za-z
> ordering is really worth to go in a lib!
>
> Hermann
>
> By the way, my "solution" is the following, that handles uppercase
> char before lowercase char sorting for each char of the lines.
>
>   set the casesensitive to true -- secondary sort:
>   sort myContainer
>   set the casesensitive to false -- primary sort:
>   sort myContainer
>
>
​I'll try to come up with something else later...

Thierry​

-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-19 Thread Thierry Douez via use-livecode
>
>
>> put "1 [A] 2 [B] 3." into tText
>> put  removeBrackets( tText)
>>
>
> I see that the middle section is omitted with my regex, so I forgot to
> make it non-greedy. But I've forgotten how to do that, something about a
> question mark, I think?


​Sorry about the delay, we had a thunderstorm which broke all Internet
network
in our area since last Friday.

You can do this in 2 ways:

- make your .* non greedy by adding a '?' suffix

- or modify your regex this way:

   "\[ [^\]]*]" which means looking for an open bracket followed by zero to
any number of chars which are not a close bracket, and last a close bracket.
BTW, no need to escape the last closing bracket; the regex engine is smart
enough.


PCRE library accepts the 2 forms.

HTH,

Thierry
​
-- 
----
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Sort so that "Hello" is always before "hello"

2017-05-19 Thread Thierry Douez via use-livecode
A slight variation from Hermann's code,
working *only* with ASCII:


sort lines of T numeric by AaZz_sort( each)


function AaZz_sort x
   get chartonum( char 1 of x)
   if IT > 96 then return ( IT - 96) * 2 + 1
   else return ( IT - 64) * 2
end AaZz_sort


I can explain if someone is asking for...

and I have no ideas if the double-sort is faster then this one.


Thierry

----
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread Thierry Douez via use-livecode
>
>
>>
>>
>>> function removeBrackets pString
>>>   return replacetext(pString,"\[.*\]",empty)
>>> end removeBrackets
>>>
>> ​​
>>
>> What would be the result of next  line:?
>>
>> *put* removeBrackets
>> ​( ​
>> "1 [A] 2 [B] 3."
>> ​)
>>
>
> An error. I did warn about my limited regex skills. :)

So what should it be?
>
> Also, that's a non-standard format for a function.

I've never seen it written that way before.


​

This should be a one-line command!
I've typed this post with the new Opera browser
???


Another try with 2 lines:

put "1 [A] 2 [B] 3." into tText
put  removeBrackets( tText)

​Better?

Thierry​



Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread Thierry Douez via use-livecode
​Hi,



>
> function removeBrackets pString
>   return replacetext(pString,"\[.*\]",empty)
> end removeBrackets
>
>
​​

What would be the result of next  line:?

*put* removeBrackets
​( ​
"1 [A] 2 [B] 3."
​)


Kind regards,

Thierry
​
--------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Recording audio with LC on OSX?

2017-04-07 Thread Thierry Douez via use-livecode
> Is there a way to "cancel" a shell command that is still running in LC?
>

​
Hi Greg,

You can do it  via another shell() call with the kill command.
Of course, you need the ID of the process you did started before.

Regards,

Thierry


-- 
--------
Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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] tinyDictionary

2017-03-22 Thread Thierry Douez via use-livecode
Hallo Bernd,


Great job, as usual !

Kind regards,

Thierry


2017-03-22 15:37 GMT+01:00 BNig via use-livecode <
use-livecode@lists.runrev.com>:

> I uploaded a compact version of the dictionaries for LC 8.1 and up to
> Livecodeshare
>
> http://livecodeshare.runrev.com/stack/825/tinyDictionary_0_7_7_7
>
> this is also accessible via "Sample Stacks" from inside LC.
>
> it is the result of Mike Kerners push to have a small footprint dictionary.
>
> James Hale contributed to tinyDict, thanks James.
>
> Comments bug reports either on the use-list or in the forum
>
> http://forums.livecode.com/viewtopic.php?f=67=28731=152646#p152646
>
> or mail me.
>
> Kind regards
> Bernd
>
>
>
> --
> View this message in context: http://runtime-revolution.
> 278305.n4.nabble.com/ANN-tinyDictionary-tp4713256.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
>



-- 

Thierry Douez - sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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


Howto read-write-import-export SAP tables

2017-03-02 Thread Thierry Douez via use-livecode
Hi,

Is there some ways to interact with SAP databases (windows)?

I need to:

import / export datas to / from SAP modules

read / write datas.

My knowledge in this area is close to zero, so any hints or links
are very much welcomed.

Kind regards,

Thierry

-- 

Thierry Douez - http
​s​
://sunny-tdz.com <http://sunny-tdz.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: Where did the cErrorsList go?

2017-02-27 Thread Thierry Douez via use-livecode
Hi Ben,

try this:

the scriptExecutionErrors


HTH,

Thierry


2017-02-27 17:11 GMT+01:00 Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com>:

> For years I've been accustomed to interpreting the error reported in a
> 'catch' statement using
>
> put line xx of the cErrorsList of card 1 of stack "revErrorDisplay"
>
>
> In 8.1.3, AFAICT, the stack "revErrorDisplay" has no such property.
>
> The dictionary still recommends this technique.
>
> Was there a flaw in the building process, or has there been a change (not
> yet reflected in the documentation)?
>
> TIA,
>
> Ben
>
> ___
> 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
>



-- 

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Write to file at end

2017-01-19 Thread Thierry Douez via use-livecode
2017-01-19 18:53 GMT+01:00 Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com>:

> Hi all.
>
> Given code snippet:
>
> open file "Forms Generator 8 Crash Log.txt" for write
>

​

open file "Forms Generator 8 Crash Log.txt" for
​append



HTH

Thierry​


--------
Thierry Douez - http
​s​
://sunny-tdz.com <http://sunny-tdz.com>
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: send control-C to a process?

2016-12-27 Thread Thierry Douez
Hi Phil,

Instead of closing your process,
try to send a SIGINT or SIGQUIT signal to the child process, eg:

kill 
kill -9 

This is just out of my head... HTH

Disclaimer: I know nothing about Sox.

and happy holidays too,

Thierry


2016-12-27 7:50 GMT+01:00 Phil Davis <rev...@pdslabs.net>:

> On a Mac I want to 'type' control-C to a process I opened for update. (I'm
> using SoX to record some spoken audio, and I want to tell it to end.) How
> do I do it?
>
> I found I can just close the process and the audio is preserved in the
> output file, but then Finder seems to have no idea what the audio duration
> is.
>
> Thanks and happy holidays to all -
>
> --
> Phil Davis
>
>


-- 
--------
Thierry Douez - http
​s​
://sunny-tdz.com <http://sunny-tdz.com>
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: iOS simulator not found after updating LC and Xcode

2016-11-03 Thread Thierry Douez
2016-11-03 15:37 GMT+01:00 Bob Sneidar :

> Which version works with which should probably be published in a document,
> and maybe already has been.
>

​Hi Bob,

There is one place:​

https://livecode.com/resources/support/ask-a-question/

​but it needs to be updated too :)
​
​Thierry
​
___
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: iOS simulator not found after updating LC and Xcode

2016-11-03 Thread Thierry Douez
Mmm, not sure as I'm far away from my computer,
but I think you need Xcode 8 ! not 8.1.

Hope someone else could confirm...

Regards,

Thierry



2016-11-03 9:57 GMT+01:00 John Allijn :

> Hi,
> Yesterday I updated Xcode to 8.1 and LiveCode to version 8.1.1 and now
> LiveCode can’t find any simulators for iOS.
> In the Livecode preferences the list with simulators is empty. When I
> click Add Entry and select the new Xcode app, it gives an error:
>
> "The chosen folder is not a valid iOS SDK. Selected Xcode must have an iOS
> SDK among: 6.1, 7.1, 8.2, 9.2 and 10.0”
>
> When I look in Xcode though, I have iOS 9.1 and iOS 9.2 installed.
> I can also see the installed SDK’s in the /developer folder on my mac but
> When I click “Add Entry” these simulators and their parent folders are not
> selectable (grayed out)
>
> Am I doing something wrong?
>
___
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: Internet date

2016-11-01 Thread Thierry Douez
and in France:

Tue, 1 Nov 2016 07:57:56 +0100


2016-11-01 7:38 GMT+01:00 J. Landman Gay <jac...@hyperactivesw.com>:

> Is the internet date in a consistent format in every country? That is,
> except for the spelling of the day and month names, is the format always
> the same?
>
> Where I am, it is:  Tue, 1 Nov 2016 01:35:55 -0500
>
> Geez, where did the year go?
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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
>



-- 

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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 do I codesign an App?

2016-10-26 Thread Thierry Douez
2016-10-26 11:41 GMT+02:00 Graham Samuel :

> Hmmm - I would like to start by understanding the why, what and where of
> certificates…
>
> Graham
>

​Hello Graham, was a long time :)

http://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html

Does this help?

Thierry

​


>
> > On 26 Oct 2016, at 11:20, Tiemo Hollmann TB  wrote:
> >
> > Hi Bill,
> >
> > the security message is just the new default setting since 10.10 or so.
> Your user can download, install and run your app, even if it is not signed,
> he only has to change the security setting in his system settings once for
> installing your app or in general.
> >
> > If you want to sign your app, there are multiple ways, Livecode (and its
> standalone settings) is none of them. You can use a tool, like AppWrapper,
> which also does signing your app, or you can do it pure via terminal with:
> >
> > Codesign -s "Your-Certificate-ID" --deep --force yourAppPath
> >
> > Hope this helps
> > Tiemo
> >
>
___
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: iOS Background Audio rejection.

2016-10-13 Thread Thierry Douez
Mmm, just did a test:

COPY:  ./Applications/LiveCode Indy
8.1.1(rc1).app/Contents/Runtime/iOS/Device-10.0/Settings.plist

INTO:~/Desktop/Info.plist

in BBEdit, edit   ./Desktop/Info.plist and add
Thierry
Douez

Here are the latest lines of this file:

UIFileSharingEnabled
${FILE_SHARING}
UIPrerenderedIcon
${PRE_RENDERED_ICON}
UIAppFonts

${CUSTOM_FONTS}

Thierry
Douez



SAVE IT.

Then, in LC 8.1.1:

Open Standalone Applications Settings for Test4iOS

Go to Copy Files Tab:

Add : ~/Desktop/Info.plist

Save and build the iOS Test4iOS .app

Then, go where the app was built, and open "Test4iOS .app"

Open the Info.plist file, and here are the latest lines:


UIFileSharingEnabled

UIPrerenderedIcon

UIAppFonts



    Thierry
    Douez




CQFD !

So, this recipe works !

Thierry




-Original Message-
> > On Thu, Oct 13, 2016 at 4:26 AM, Thierry Douez <th.do...@gmail.com>
> wrote:
> >
> >> Hi Phil,
> >>
> >> Did you try this recipe:
> >>
> >> Copy the template plist from LC.
> >>
> >> Edit it the way you like.
> >> .
> >> Name it Info.plist and add it to "copy files" tab in Standalone
> settings.
> >>
> >> ​Not sure if this still works
> >>
> >> HTH,
> >>
> >> Thierry
>
___
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: iOS Background Audio rejection.

2016-10-13 Thread Thierry Douez
Hi Phil,

Did you try this recipie:

Copy the template plist from LC.

Edit it the way you like.
.
Name it Info.plist and add it to "copy files" tab in Standalone settings.


​Not sure if this still works

HTH,

Thierry​


-- 
Thierry Douez - http
​s​
://sunny-tdz.com <http://sunny-tdz.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: regex to add a variable to calls

2016-09-19 Thread Thierry Douez
2016-09-17 0:13 GMT+02:00
Dr. Hawkins <doch...@gmail.com>:

I need to catch every instance of
>
> getVal(a,b,c)
>
> and change them to
>
> getVal(a,b,c,dbtr)
>
> (and similarly to find when called with one or two arguments)
>
> dbtr is the variable name I want to pass.
>


​Here is one way to do it.


*on* mouseUp

*put* "getVal\([^)]+(?=\))" into theRegex

*put* "\0,dbtr" into smartReplaceText

*if* sunnyreplace( fld "f1", theRegex, smartReplaceText, outText) *then*

*put* outText into fld "f2"

*end* *if*

*end* mouseUp

​

​some sample input text in fld "F1" :

get getVal(a)

put getVal(a,b) into z

put getVal(a,b,c) && getVal(a,b,c) into y


and results in fld "f2":

get getVal(a,dbtr)

put getVal(a,b,dbtr) into z

put getVal(a,b,c,dbtr) && getVal(a,b,c,dbtr) into y


Is this what you are looking for?

Regards,

Thierry
​



Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: SVG Editors, anyone?

2016-08-05 Thread Thierry Douez
My preferate: Affinity Designer

https://affinity.serif.com


Thierry

2016-08-05 16:57 GMT+02:00 Graham Samuel :

> Having got very interested in LC widgets at the conference, I’m about to
> start experimenting, but I need to create some SVG graphics based on my own
> designs. I can’t afford Illustrator - has anyone got any recommendations
> for a free, or at any rate, not very expensive, editor suitable for making
> LC-widget-compatible graphics?
>
___
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: Extracting list of errors from LiveCode 8

2016-08-04 Thread Thierry Douez
Hi Lyn,

within LC 8.0, this works:

*put* the cErrorsList of stack "revErrorDisplay"

​Regards,

Thierry
​


> In LiveCode 7 and earlier, one could use the following to extract the list
> of errors:
>
> the cErrorsList of cd 1 of stack "revErrorDisplay"
>
> However, this no longer works in LiveCode 8.
>
> What is the new method of extracting the list of errors?
>
> TIA,
> Lyn
>
> ----
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: LCB shell?

2016-06-09 Thread Thierry Douez
Hi Mark,

Not sure if this will help you, but anyway
it's an interesting post.

http://blog.peter-b.co.uk/2015/09/using-c-library-functions-from-livecode.html

Regards,

Thierry


2016-06-10 3:37 GMT+02:00 Mark Wieder <mwie...@ahsoftware.net>:

> Is the shell command/function available in extensions? I'm getting script
> parsing errors that seem like they might indicate that it's not, and the
> dictionary isn't conclusive on that issue. If it's not available for
> extensions, is there an alternative? I've got a script stack library that
> I'm trying to make into an extension, and I'm tripping over the syntax.
>
> Somewhere there should be a list of LCS-LCB translations. So far today
> I've already found
>
> LCS  LCB
> the platform <-> the operating system
>
> --
>  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
>



-- 

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: LC 8 Random crash with QT set the filename of player on OS X

2016-06-06 Thread Thierry Douez
Hi Tiemo,


From Apple docs:

Intel Core Solo 32 bits
Intel Core Duo 32 bits
Intel Core 2 Duo 64 bits
Intel Quad-Core Xeon 64 bits
Dual-Core Intel Xeon 64 bits
Quad-Core Intel Xeon 64 bits
Core i3 64 bits Core i5 64 bits
Core i7 64 bits

  ( Dernière modification: 18 mars 2015)


">  -Where can I check, if my system is running in 32 or 64 bit?


​HTH,

Thierry​



----
Thierry Douez - http://sunny-tdz.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: Don't understand unicode handling

2016-05-20 Thread Thierry Douez
Hallo Tiemo,


from: http://lessons.livecode.com/m/4071/l/12304-how-do-i-use-unicode-in-rev


To import text from a UTF-8 file and display it in our stack we just need
to read it in, uniEncode() it and then display it as we learnt earlier.

*put* url ("file:greek.txt") into tUnicodeText

*set* the unicodeText of field 1 to uniEncode(tUnicodeText,"UTF8")

If we want to export text from our stack we simply go in the other direction

*put* uniDecode(the unicodeText of field 1,"UTF8") into tUTF8Text

*put* tUTF8Text into url("file:greek2.txt")



Guess it's what you need


Regards,

Thierry

--------
Thierry Douez - http://sunny-tdz.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: Change mobile settings - file association in your iOS or Android app

2016-05-16 Thread Thierry Douez
Ludovic,

Try this:

Copy the template plist from out of LC.

Edit it the way you like.
.
Name it Info.plist and add it to copy files in Standalone settings.

I never did it but I think I've seen this trick in this list a couple of
months ago.

Good luck,

Thierry




2016-05-16 16:48 GMT+02:00 Ludovic THEBAULT <ludovic.theba...@laposte.net>:

>
> > Le 14 mai 2016 à 18:49, Ludovic THEBAULT <ludovic.theba...@laposte.net>
> a écrit :
> >
> > Hello,
> >
> > Until now, i’ve used a little stack to update the mobile settings in the
> Livecode application (/Applications/LiveCode Indy
> 7.1.4.app/Contents/Tools/Runtime/iOS/Device-8_2/Settings.plist) for example
> to indicate my app as French.
> >
> > With the 7.14 version, this stack doesn’t work because « i need admin
> privilege ». I think is because the Livecode app is signed (at first launch
> we can see an verification from gatekeeper).
> > But how i can change (even manually) these settings if livecode is
> signed ?
> >
>
> So,
>
> I use « Sudo nano » to edit the file.
>
> But it is the only way to do ?
>
> What the best practice to add, for example, a file association in your iOS
> or Android app with Livecode ?
> It is possible to do it when saving the standalone ?
>
> Thanks
>
> --

Thierry Douez - http://sunny-tdz.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: Shell Fails on One Machine

2016-05-05 Thread Thierry Douez
> New iMac with clean install of El Capitan
>
> But from inside my app
>
> Put  "/Volumes/Chola1/WWW/public_html” into pPath
> put ("open " & quote & pPath & quote) into tShell
> get shell (tShell)
>
> The result is “1”
>
> Any clues?
>
>
​Hi,

What happens when you do this:

  put shell("open -h")

should return the help summary.
If not, then you have a PATH problem.

Regards,

Thierry
​


Thierry Douez - http://sunny-tdz.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: Doing Maths in Hex

2016-05-03 Thread Thierry Douez
> > and with a bit of factoring...
> >
> >   put addHex( "20F", "4CD")
> >
> >
> > function addHex v1, v2
> >   local d1, d2
> >   put baseConvert( v1,16,10)  into d1
> >   put baseConvert( v2,16,10)  into d2
> >   return baseconvert( d1 + d2, 10, 16)
> > end addHex
> >
> > Thierry
>
> Well done, Thierry!
>
> Devin
>

​Thanks Devin :)

and before the next cquestion will arises:
​

put addHexy( "20F", "4CD", "10", "3AB")

function addHexy
   local T
   repeat with i = 1 to paramCount()
  add baseConvert(  param( i) ,16,10) to T
   end repeat
   return baseconvert( T, 10, 16)
end addHexy


​Thierry
​


Thierry Douez - http://sunny-tdz.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: Doing Maths in Hex

2016-05-03 Thread Thierry Douez
and with a bit of factoring...

   put addHex( "20F", "4CD")


function addHex v1, v2
   local d1, d2
   put baseConvert( v1,16,10)  into d1
   put baseConvert( v2,16,10)  into d2
   return baseconvert( d1 + d2, 10, 16)
end addHex

Thierry



2016-05-03 18:13 GMT+02:00 Devin Asay <devin_a...@byu.edu>:

>
> > On May 3, 2016, at 9:32 AM, dunbarx <dunb...@aol.com> wrote:
> >
> > Richmond.
> >
> > LC cannot add "20F" to "4CD". You need to use "baseConvert". Not onerous
> at
> > all, really.
>
> put baseConvert(baseConvert("20F",16,10) + baseConvert("4CD",16,10),10,16)
>
> devin
>
>

-- 

Thierry Douez - http://sunny-tdz.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: Beeing a developer after 40

2016-04-29 Thread Thierry Douez
Hi Erik,

Thanks for sharing.

You make my day... the day of an old developer :)

Regards,

Thierry



2016-04-29 7:43 GMT+02:00 Erik Beugelaar <ebeugel...@gmail.com>:

> For who it may concern... (I am 49...;-)
>
> Adrian Kosmaczewski destroys any concerns you may have about becoming an
> older developer (19 minute read): http://bit.ly/1qWJy53
>
> Have a nice day!
> Erik
>
>
>
>
> --
>
>
> Sent from Matwetwe <http://www.about.me/beugelaar>
> ___
> 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
>



-- 

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: File exists

2016-04-02 Thread Thierry Douez
Hi,

there is a file ".."

HTH,

Thierry


2016-04-02 10:48 GMT+02:00 JB <sund...@pacifier.com>:

> If I open a file for read or write and the file does
> not exist it will be created.  Is there a way to see
> if the file exists before opening it?  I do not want
> a file to be created if it does not exist.  I guess I
> could check the creation date and if it was just
> created then delete it but I was wondering if there
> is a better way.
>
> JB
>
-- 
--------
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Script Only Stack Architecture

2016-03-31 Thread Thierry Douez
> Am I wrong. misguided, foolish, or brilliant?
>

​You are brilliant !!!

Mmm, as long as you don't need behaviors :)

Kind regards,

Thierry

---​

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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] guides for positioning of controls

2016-03-24 Thread Thierry Douez
Hallo Bernd,

Ich gratuliere dir zu diesem Plug-In.
Großartig!

Nice piece of art, kudos :)

Thierry

2016-03-23 22:26 GMT+01:00
BNig <bernd.niggem...@uni-wh.de>:

> I
> http://berndniggemann.on-rev.com/guides/bnGuides_0_4.livecode.zip
> -
>
> Kind regards
> Bernd
>



-- 
--------
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Min function

2016-02-28 Thread Thierry Douez
2016-02-28 13:01 GMT+01:00 Terence Heaford <t.heaf...@icloud.com>:

> Thanks,
>
> That is a good solution which will also apply to Max.
>
> I just thought that anything that can be rolled into the engine would be
> faster and
> usually every tick/millisecond that can be gained is worth having in an
> interpreted language.
>
>
>
​Well, as I don't know your context,
I'm not sure if speed is really a problem here?

Anyway, you make me feel curious about this,
and I've checked the speed against 3 variants.

First, I generated 2 lists of numbers.


   repeat with i=1 to 1000
  get random( 1000)
  put IT & cr after LinesOfNumbers
  put IT & comma after OneLineOfNumbers
   end repeat
   delete last char of LinesOfNumbers
   delete last char of OneLineOfNumbers


Then, run:



   put 100 into nRepeat

   put the milliseconds into _ct
   -- case 1
   repeat nRepeat
  put min( replaceText( LinesOfNumbers, return,comma))  into min1
   end repeat

   put (the milliseconds - _ct)  / nRepeat into timing1

   wait 1 ticks with messages
   put the milliseconds into _ct

   -- case 2
   repeat nRepeat
   replace return with comma in LinesOfNumbers
  put min( LinesOfNumbers)  into min2
   end repeat

   put (the milliseconds - _ct)  / nRepeat into timing2

   wait 1 ticks with messages
   put the milliseconds into _ct

   -- case 3
   repeat nRepeat
  put min( OneLineOfNumbers) into min3
   end repeat

   put (the milliseconds - _ct)  / nRepeat into timing3




   answer format( "Done in %.2f - %.2f -  %.2f  /%s",  timing1,  timing2,
timing3, min1 is min2)

​


​Trying it few times for a list of 1000 items,

we have the winner which obviously is case 3: 1,47 ms
case 1 is 1,85 ms and case 2 is 4,5 ms.

Increase the number of items  to 1,
then you'll see much more distant results.

But now, if you 're working with a list of 10 items,
it really doesn't matter as the result are:

0,07 0,04, 0,03 ms

Hope you find this interesting.

Thierry





> > Thierry Douez <th.do...@gmail.com> wrote:
> >
> > What about this?
> >
> > return  min( replaceText( myListOfNumbers, "\n",comma))
> >
> >
> > 2016-02-28 12:05 GMT+01:00 Terence Heaford <t.heaf...@icloud.com>:
> >
> >>
> >> I thought Min may work with the itemDelimiter but apparently not.
> >>
> >> Is that something that would be useful?
> >>
> >> set the itemDelimiter to return
> >>
> >> return Min (myListOfNumbers) — based on return not comma
>
-


-

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: Min function

2016-02-28 Thread Thierry Douez
What about this?

 return  min( replaceText( myListOfNumbers, "\n",comma))


2016-02-28 12:05 GMT+01:00 Terence Heaford <t.heaf...@icloud.com>:

>
> I thought Min may work with the itemDelimiter but apparently not.
>
> Is that something that would be useful?
>
> set the itemDelimiter to return
>
> return Min (myListOfNumbers) — based on return not comma
>



-- 
--------
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: DataGrid

2016-02-25 Thread Thierry Douez
Thanks to Bernd for this link:

http://berndniggemann.on-rev.com/modTableField/

Thierry


-- 

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: is find or offset with wildcards possible?

2016-02-10 Thread Thierry Douez
2016-02-10 18:06 GMT+01:00
Tiemo Hollmann TB <toolb...@kestner.de>:

> Bonsoir Thierry,
> ui, thats fancy. I haven't seen yet a function which changes input
> parameter as a kind of result
> Salut
> Tiemo
>

​:)

I guess one has to get used to this...

But it's a very powerfull function when you know
how to work with it!

Thierry

​


>
>   get matchChunk( Text, Regex, pStart, pEnd)
> <http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>

-- 
--------
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: is find or offset with wildcards possible?

2016-02-10 Thread Thierry Douez
​Hallo Tiemo,
​

as far as I have seen it, matchChunk and matchText only return true or false
> and not an offset or position
> Am I wrong?
>

​Yes :)

 get matchChunk( Text, Regex, pStart, pEnd)

HTH,

Thierry
​


-- 
----
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: AW: Re: Regex help needed...

2016-02-03 Thread Thierry Douez
​​
>  Regex has  been around a long time
>  and lots of smart computer science types has
> spent time coming up with ways to optimize its performance for pattern
> matching.

That's was true, it's still true and will always be true!


and here are some benchmarks
done in a late rainy sunday evening:


* Regex2 faster than Chunk by: 2.1 times*


For the details:

1) Regex1 is the original regex, Chunk1 is  from Richard, Regex2 is mine.
2) You can noticed the difference in time depending on the value of pPage
( that's a normal behavior with regex)
3) I've done the calculation the same way as Richard did, so you can compare



**  aPage = 1, Same? true true
Regex1: 8943 ms
Chunk1: 210 ms
Regex2: 99 ms
Regex2 faster than orig regex by: 90.3 times
Regex2 faster than Chunk by: 2.1 times

**  aPage = 2, Same? true true
Regex1: 9946 ms
Chunk1: 212 ms
Regex2: 100 ms
Regex2 faster than orig regex by: 99.5 times
Regex2 faster than Chunk by: 2.1 times

**  aPage = 3, Same? true true
Regex1: 4451 ms
Chunk1: 210 ms
Regex2: 98 ms
Regex2 faster than orig regex by: 45.4 times
Regex2 faster than Chunk by: 2.1 times

**  aPage = 4, Same? true true
Regex1: 11465 ms
Chunk1: 200 ms
Regex2: 98 ms
Regex2 faster than orig regex by: 117 times
Regex2 faster than Chunk by: 2 times

**  aPage = 5, Same? true true
Regex1: 11457 ms
Chunk1: 201 ms
Regex2: 94 ms
Regex2 faster than orig regex by: 121.9 times
Regex2 faster than Chunk by: 2.1 times




Kind regards,

Thierry



--------
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: AW: Re: Regex help needed...

2016-02-03 Thread Thierry Douez
There's huge differences in how regex implementations perform in different
> languages. For example: http://raid6.com.au/~onlyjob/posts/arena/
>


​Last year, I did some experiments:

I had a 100 lines of LiveCode with a bunch of really big Regex.
It took 120 seconds on my Macbook to run.

I tried diffferent ways to write/modify the regex, and it always keep
running
around 120 seconds.


Then, using my sunnYperl external,
I copy/paste all my regex ( not one modification )
and rewrite the LC part in Perl (a bit more work but not that much).

I came down to 9 seconds.

​
Kind regards,

Thierry​



-- 
----
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage
___
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: exits on suspend (was Re: Davos Day 3)

2016-01-26 Thread Thierry Douez
2016-01-26 11:54 GMT+01:00
Ben Rubinstein <benr...@cogapp.com>:

> - interestingly, when the stack is not set to exit to suspend, it does not
> appear to get any of the messages you might expect (i.e.
> suspend/resume[Stack]). AFAICT there's no way with this option for an app to
> tell when it has been suspended.  (Without this option set, the app gets
> shutdown/closeCard/closeStack; followed when reopened by
> startup/openStack/openCard).
>
> Ben

Hi Ben.

You could have a look here:

http://forums.livecode.com/phpBB2/viewtopic.php?f=49=23570=122312#p122123

I did this job almost a year ago.

If you are interested to know more about it, you know how
to contact me.

Kind regards,

Thierry


--------
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
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: LiveCode with unusual input devices

2015-12-21 Thread Thierry Douez
> 2015-11-17  [-hh]:
>> Ben R. wrote:
>> Does anyone have (fairly recent) experience using LiveCode to with unusual  
>> input devices - phidgets, PowerMate, MIDI keyboards or controllers, DMX, etc?
>> On either Mac OS X or iOS? What's easy?  What works?  Are there good 
>> externals or libraries I should know about?
>
>
> For MIDI on Mac there is a very high quality external:
>SunnYmidi by Thierry Douez. ( http://sunny-tdz.com ).

For the record,
the Midi Controler  "AKAI APC Mini"
has been successfully used
as an input and output device for Livecode.

http://forums.livecode.com/phpBB2/viewtopic.php?f=6=4978=135985#p135985


Kind regards,

Thierry

----
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
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: Strange bevavious

2015-12-19 Thread Thierry Douez
2015-12-19 16:04 GMT+01:00 tkuyp...@telenet.be <tkuyp...@telenet.be>:
> Not sure where to post this, but I’ve been experiencing a very strange issue 
> with LC 7 and after some testing with LC8, it seems to have gotten even worse…
>
> It only happens in the IDE on my Mac, not in standalones.
> It happens in 10.11.2, but it was there in the previous versions as well, 
> can’t remember when it started.
>
> The issue is that when I use the Open menu to manually open a stack, it takes 
> almost a minute before the open dialog shows.
> Also when I use the Open, the Answer or the Ask command it takes between 50 
> and 70 seconds to show the dialog.
> But only the first time after I restart LiveCode, every next time I try to do 
> this, it works as normal.
> And it is not LiveCode that is non-responsive, the whole system hangs, that’s 
> why i can tell how long it taken, because even the clock in my menubar is 
> frozen…
>
> During some tests with LC8, it takes anywhere from 2 to 2:30 minutes, so it 
> is getting worse.
>
> I already removes everything from LiveCode, but no difference.
>
> Anybody a suggestion maybe?

Hi Ton,


http://forums.livecode.com/viewtopic.php?f=104=24971

and

Might be good if you put some words here:

http://quality.livecode.com/show_bug.cgi?id=16612


Kind regards,

Thierry



Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
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: Floating Point

2015-11-27 Thread Thierry Douez
You can try this:

put format( "%.2f", 42)


HTH,

Thierry



2015-11-27 18:49 GMT+01:00 Peter Haworth <p...@lcsql.com>:
> I'm working with a third party API that requires me to supply one of the
> parameter values in floating point notation.  The value will be a number
> keyed into an LC field.  Does LC have a built-in way to convert a number to
> floating point format?
>
> Pete
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> ___
> 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



-- 

Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
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: externals on Windows

2015-09-09 Thread Thierry Douez
> I know nothing about writing externals for Livecode on Windows.
> Are there any tutorials available?



http://newsletters.livecode.com/november/issue13/newsletter5.php

http://newsletters.livecode.com/november/issue14/newsletter3.php

http://newsletters.livecode.com/october/issue34/newsletter1.php


Kind regards,

Thierry


----
Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
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: BBEdit/Textwrangler LCM for livescript

2015-09-09 Thread Thierry Douez
Hi,

Replace the key 'Function Pattern' with the one below
and you might have a surprise with code folding..

Function Pattern



Tested successfully but very quickly with TextWrangler 4.5.12 ( the latest)

I have another option, but let comments arise before going further..

Regards,

Thierry


Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
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: Compare numeric strings with leading zeros

2015-09-04 Thread Thierry Douez
> What’s wrong with simply:
>
> function stringsAreEqual p1, p2
>return (p1 & "z") = (p2 & "z")
> end stringsAreEqual
>
> As Terry Judd and Mark Wieder suggested yesterday?

Mmm, nothing.

Different ways, different experiences ... :)

Regards,

Thierry

___
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: Compare numeric strings with leading zeros

2015-09-03 Thread Thierry Douez
You can use build-in functions which manipulate strings.

Please, try this one:

on mouseUp
   local userTyping = 5
   local myVeryStrongPassword = "005"
   if matchText( userTyping, myVeryStrongPassword) then
  answer "Great!"
   else
  answer "Too bad :( try again.."
  put "005" into userTyping
  if matchText( userTyping, myVeryStrongPassword) then answer "Great!"
   end if
end mouseUp

Regards,

Thierry


2015-09-03 7:00 GMT+02:00 Mark Wieder <mwie...@ahsoftware.net>:
> On 09/02/2015 09:49 PM, Ralph DiMola wrote:
>>
>> I would have thought 5=005 would evaluate as true and "5"="005" would
>> evaluate as false.
>
>
> In any other language that would work.
> Unfortunately in LC everything's stringish.
>


Thierry Douez - http://sunny-tdz.com
sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
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: Compare numeric strings with leading zeros

2015-09-03 Thread Thierry Douez
Hi,

> Ah,

Well, nothing very dangerous here :)

>>   if matchText( userTyping, myVeryStrongPassword) then ...

This was a direct answer to this thread:

 "compare numeric strings with leading zeros" !


> I would caution against using matchText for this purpose,
> because the second
> parameter is treated by the function as a regular expression.


Yes,
myVeryStrongPassword is a regular expression in a pure litteral form.


>
> For instance, matchText would return true if you were to reverse your
> example values:

Yes, the order of the parameters have a meaning, but this is true
for so much functions in LC. So, I don't get it :(


> In addition,
> since passwords are typically allowed to contain any character

Was not asked by the OP.

Ok then, so new  rules here:)

>local userTyping = "5"
>local myVeryStrongPassword = "^5$"

If your password can contains any chars,
Just tell it to matchText():

my password can be any character and I don't want you to
interpret them in any ways!

For that,
enclose your myVeryStrongPassword by "\Q" & "\E" and it
will be interpreted as litteral characters.


> Since Ralph is looking to use this for password validation,
> I would throw in a case sensitivity check as well:

For this one, there is nothing special to do.
If it will be case insensitive you could add a prefix to the regex: (?i)

so the final matchText() solution is:

put  "\Q^5$\E"  into  myVeryStrongPassword
if matchText( userTyping,  myVeryStrongPassword ) then ...


Ok, now I'm waiting for what I've missed...

Have all a nice day or night.

Thierry

___
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: Compare numeric strings with leading zeros

2015-09-03 Thread Thierry Douez
>
>> Ok, now I'm waiting for what I've missed...
>
> Your revised example was missing a "^" at the beginning and a "$" at the end.
>
>put "^\Q^5$\E$" into myVeryStrongPassword
>
> Lyn
>

Good catch :)

Regards,

Thierry

___
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 saucy is Open Source

2015-09-02 Thread Thierry Douez
>> Would it be permissible to sell a book with a CD strapped to its back 
>> containing
>> community versions of LiveCode?
>
> Yes, that is allowed. As the Community engine is GPL’ed, you’d have to 
> include an offer to supply the source code for the engine, but you can do 
> this by having the source code on the CD too.
>

I guess a link to github-> livecode could be enough, no?

Just wandering..

Regards,

Thierry

___
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: LC676 IDE change in behavior?

2015-08-31 Thread Thierry Douez
Hi Paul,

It looks like the latest bug report I sent to Qcc.

Doesn't have the Qcc number right now.

Regards,

Thierry


Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage


2015-08-31 17:50 GMT+02:00 Paul Dupuis <p...@researchware.com>:
> I have noticed that when I double click on a stack on my desktop (or ay
> folder) (on Windows) to open it in LiveCode 6.7.6, that when the stack
> opens, the stack window is show briefly and then hides. I have to open
> the stack window by double clicking on it in the application Browser for
> it to display.
>
> There is no startup, preopenstack, openstack, preopencard or opencard
> handlers. The stack's visible property and rect and loc are all set to
> default values so it should be when LiveCode starts up.
>
> Is anyone else seeing this? Was there a change of IDE behavior between
> LC665 and 676?
>
> ___
> 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: LC676 IDE change in behavior?

2015-08-31 Thread Thierry Douez
Here it is:

http://quality.runrev.com/show_bug.cgi?id=15721

and if you can provide a sample stack,
it could help (see my last comment in qcc)

Regards,

Thierry


2015-08-31 18:02 GMT+02:00 Thierry Douez <th.do...@gmail.com>:
> Hi Paul,
>
> It looks like the latest bug report I sent to Qcc.
>
> Doesn't have the Qcc number right now.
>
> Regards,
>
> Thierry
>
> --------
> Thierry Douez - http://sunny-tdz.com
> Maker of sunnYperl - sunnYmidi - sunnYmage
>
>
> 2015-08-31 17:50 GMT+02:00 Paul Dupuis <p...@researchware.com>:
>> I have noticed that when I double click on a stack on my desktop (or ay
>> folder) (on Windows) to open it in LiveCode 6.7.6, that when the stack
>> opens, the stack window is show briefly and then hides. I have to open
>> the stack window by double clicking on it in the application Browser for
>> it to display.
>>
>> There is no startup, preopenstack, openstack, preopencard or opencard
>> handlers. The stack's visible property and rect and loc are all set to
>> default values so it should be when LiveCode starts up.
>>
>> Is anyone else seeing this? Was there a change of IDE behavior between
>> LC665 and 676?
>>
>> ___
>> 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: Extracting a reference to a stack

2015-08-08 Thread Thierry Douez
Here is a regex solution.

and as a bonus, in 3 variants:

on mouseUp
   --button id 1003 of card id 1002 of stack stack 2
   --of stack /Users/t/Desktop/stack.livecode

   put fld L1 into aLongID

   put theStackOwner( aLongID) into field L2

   put theMainStackOwner( aLongID) into field L3

   put stackOwners( aLongID) into R

   if R is empty then put not found into fld L4
   else put item 1 of R  ---  item 2 of R into field L4
end mouseUp



function theStackOwner pLongID
   if matchText(pLongID, of stack \x22(.*?)\x22, _1) then return _1
   return not found
end theStackOwner

function theMainStackOwner pLongID
   if matchText(pLongID, of stack \x22([^\x22]*)\x22$, _1) then return _1
   return not found
end theMainStackOwner

function stackOwners pLongID
   local REX
   put (?: of stack \x22([^\x22]*?)\x22)? of stack
\x22([^\x22]*)\x22$ into REX
   if matchText(pLongID, REX, _1, _2) then return _1 comma _2
   return empty
end stackOwners

Did a quick test, so it works here,
plus I put the word stack in the stack names for a more severe test.

As I hate to write  quote  in my code,
\x22 is the ASCII value for the quote char.

Not tested on LC 7 yet.

Regards,

Thierry





Thierry Douez - http://sunny-tdz.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: Extracting a reference to a stack

2015-08-08 Thread Thierry Douez
 Yep - and being a lazy person this is how I get the stack reference:

 function ObjectStack pObj
return char (offset( of stack , pObj)+4) to -1 of pObj
 end ObjectStack


Not always beneficial to be lazy :)

I tried your code with the long ID I gave previously
without success.

Regards,

Thierry



Thierry Douez - http://sunny-tdz.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: mergJSON, externals and Livecode Server

2015-08-04 Thread Thierry Douez
2015-08-04 10:57 GMT+02:00
David Bovill david@viral.academy:

Hi David,

You might find this tool (binary available) interesting:

http://stedolan.github.io/jq/


Otherwise, for linux, externals have to be built speciffically for the platform

HTH,

Thierry



 Hi - I'm looking to switch from parsing JSON with scripts to Monte's
 external (which i've been using on mobile / desktop for a while and works
 great) - but I can't get it working (Im on Ubuntu 14.04 with DigitalOcean)
 and Livecode server version 7.06 rc3).

 It's either because the external does not work on the distro I have (from
 memory it's a 64 bit server install), or more likely I'm doing something
 stupid like not registering the external properly.

 Any pointers as to how to register externals for a server / how to check
 they are installed - I'm getting an empty response from:

- the externalpackages of stack home

 which is probably the wrong thing to do on a server anyway :)
 ___
 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: mergJSON, externals and Livecode Server

2015-08-04 Thread Thierry Douez
and here a previous post from Mark Wieder:

A coworker hipped me to the fact that OSX has a built-in json parser.
As does linux.

Takes input from stdin and sends to stdout, so

json_pp  filename

will parse and pretty-print a json file for you.

I was feeling uneasy about posting json data to online parsers,
and this does the trick quite nicely.

Best,
Thierry



2015-08-04 11:43 GMT+02:00 Thierry Douez th.do...@gmail.com:
 2015-08-04 10:57 GMT+02:00
 David Bovill david@viral.academy:

 Hi David,

 You might find this tool (binary available) interesting:

 http://stedolan.github.io/jq/


 Otherwise, for linux, externals have to be built speciffically for the 
 platform


 Hi - I'm looking to switch from parsing JSON




Thierry Douez - http://sunny-tdz.com
Maker of sunnYrex - sunnYtext2speech - sunnYperl - sunnYmidi - sunnYmage

___
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: Referencing a control name

2015-07-25 Thread Thierry Douez
Hi Sri,

Try this:

on mouseUp
   put the width of field Field1
   put the width of (field Field1)
end mouseUp

but put this script in a button, not the message box!

This should give you the trick.

HTH,

Thierry


Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage


2015-07-25 16:22 GMT+02:00 Sri sri...@gmail.com:
 The parenthesis placements are key in such references as they change the
 order of command processing.

 For example:
 1. Create a button Test1 of width 82 (say)
 2. Create a field Field1 of width 168 (say) containing the text: /button
 Test1/
 3. Type into message box
 put the width of field Field1
 Answer: 168
 4. Type into message box
 put the width of (field Field1)
 Answer: 82

 Regards,
 Sri



 --
 View this message in context: 
 http://runtime-revolution.278305.n4.nabble.com/Referencing-a-control-name-tp4694325p4694334.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 can I strip away formatting from an RTF file?

2015-07-08 Thread Thierry Douez
2015-07-08 19:24 GMT+02:00 Gregory Lypny gregory.ly...@videotron.ca:
 Hi everyone,

 I imported an RTF file and put it into a field using

set the RTFText of field File Text to url (file:  longFileName)

after your line of code, do:

  put fld File Text into fld File Text

HTH,

Thierry

___
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: Using sudo in shell

2015-07-08 Thread Thierry Douez
Hi Glen,

Not knowing your context, this might not be what you are looking for.
but as a start?

http://superuser.com/questions/256981/non-interactive-ssh-sudo-prompts-for-the-password-in-plain-text

Regards,

Thierry


Thierry Douez - http://sunny-tdz.com
sunnYperl - sunnYmidi - sunnYmage - sunnYtext2speech - sunnYrex


2015-07-08 19:35 GMT+02:00 Glen Bojsza gboj...@gmail.com:
 I was wondering if there is a way to do a shell that has sudo in it?

 On the first attempt (Note dart is an internal application)

 put shell (sudo dart)

 I get the following error message

 sudo: no tty present and no askpass program specified

 Is there any way to run sudo from the shell?

 thanks,

 Glen

___
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: xCode Error with iOS 8.3 Device

2015-06-30 Thread Thierry Douez
Scott,

and what happened if you build your Standalone with 8.1 settings ?

Regards,

Thierry



Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage sunnYpdf - sunnYrex -
sunnYtext2speech

___
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: discovering externals on iOS

2015-06-29 Thread Thierry Douez
2015-06-29 11:20 GMT+02:00
Scott Morrow sc...@elementarysoftware.com:

Hi Scott,

 Is there any way to discover (from a script)
 whether a particular external is available in a compiled iOS app.

AFAIK, No.

 I’m using “try / catch” and that seems to work
 but I was hoping for something I could query ahead of the fact.

That's the way I would do it...


HTH,

Thierry

___
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: iOS iPAd development question

2015-06-29 Thread Thierry Douez
Hi Glen,

You might find interesting to know a bit more:

Apple has changed its policy regarding permissions required to build
and run apps on devices. Until now, Apple required users to pay
$99/year to become a member of Apple’s Developer Program in order to
run code on physical iPhone and iPads. As part of the new Developer
Program, this is no longer required. Apps can be tested on devices, no
purchase necessary.

From this article written 2 weeks ago:

http://9to5mac.com/2015/06/10/xcode-7-allows-anyone-to-download-build-and-sideload-ios-apps-for-free/

Regards,

Thierry


Thierry Douez - http://sunny-tdz.com
sunnYperl - sunnYmidi - sunnYmage - sunnYpdf - sunnYtext2speech - sunnYrex

___
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

[ANN] Text to speech for iOS.

2015-06-24 Thread Thierry Douez
Dear iOS LiveCoders,

I'm pleased to annouce the first release of sunnYtext2speech,
a text to speech external for iOS.

http://sunny-tdz.com/sunnytext2speech

A trial version with a demo stack is also available.

Kind regards,

Thierry


Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage - sunnYtext2speech

___
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: animated GIF images

2015-06-19 Thread Thierry Douez
2015-06-19 2:28 GMT+02:00 Roger Guay i...@mac.com:

 O, Laurel and Hardy. I can’t pass that up.

:)

How does one get to see your tutorial?

https://vimeo.com/105437104

and if you have a mac:

http://sunny-tdz.com/dwn and get the Demo version.


Regards,

Thierry

___
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: animated GIF images

2015-06-18 Thread Thierry Douez
From very old memories:

set the repeatcount of me to 0 -- to stop
set the repeatcount of me to -1 -- to loop forever
set the repeatcount of me to 42 -- to lop 42 times


Regards,

Thierry



 Does anyone know if there is away to stop and start these
 animations?

 Richmond.


___
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: animated GIF images

2015-06-18 Thread Thierry Douez
2015-06-18 15:40 GMT+02:00
Roger Eller roger.e.el...@sealedair.com:

 What they said  ;-)


You wake up my curiosity :)

So, I check the repeatcount and it works as expected with LC 6.7.5 on Mac.

Otherwise, if you try my sunnymidi tutorial, there is a gif animation
(Laurel and Hardy)
which is moved frame by frame with a music note generated at a specific frame.
It works too.

This reminds me that some gifs are not readable with Livecode
but Im not an expert on this topic.

Regards,

Thierry


 On Thu, Jun 18, 2015 at 8:52 AM, Mike Bonner bonnm...@gmail.com wrote:

 You can also run the loop by yourself by setting the currentframe (assuming
 you're set the repeatcount to 0) You'd need to get the framecount of the
 image so you know how many frames to manage with your frame loop.

 On Thu, Jun 18, 2015 at 6:36 AM, Thierry Douez th.do...@gmail.com wrote:

  From very old memories:
 
  set the repeatcount of me to 0 -- to stop
  set the repeatcount of me to -1 -- to loop forever
  set the repeatcount of me to 42 -- to lop 42 times
 
 
  Regards,
 
  Thierry
 
   Does anyone know if there is away to stop and start these
   animations?
  

___
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: GitHub starter guide?

2015-05-02 Thread Thierry Douez
Bonjour Pierre,


 The french v2 of the book is a pleasant and very accessible read.

A real gift to read git in French :)



  I just discovered that Git is a Linus Torwald’s creation ;D

small world...



Regards,

Thierry




Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage

___
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: GitHub starter guide?

2015-05-02 Thread Thierry Douez
About git:

http://git-scm.com/about


A git cheat sheet:

https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf


Entire Pro Git book:

http://git-scm.com/book/en/v2


Infos about this book:

Download this book in PDF, mobi, or ePub form for free.

This book is translated into Deutsch, 简体中文, 正體中文, Français, 日本語,
Nederlands, Русский, 한국어, Português (Brasil) and Čeština.

Partial translations available in Arabic, Español, Indonesian,
Italiano, Suomi, Македонски, Polski and Türkçe.

Translations started for Azərbaycan dili, Беларуская, Català,
Esperanto, Español (Nicaragua), فارسی, हिन्दी, Magyar, Norwegian
Bokmål, Română, Српски, ภาษาไทย, Tiếng Việt, Українська and Ўзбекча.



Regards,

Thierry




Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage - sunnYrex
___
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: Something like charIndex, but in a variable...

2015-04-30 Thread Thierry Douez
 orange banana tomato
 banana tomato orange
 tomato banana orange

Experimenting with regex...
Sorry, couldn't resist :)


function MalteCharIndex T, nWord, nLine,@p1, @p2
   get format( (?mx)(?: .*? \\n){%d}   (?: (\\w+) [\\W]*){%d}, nLine
-1, nWord)
   return matchChunk( T,  IT, p1, p2)
end MalteCharIndex


and run it this way:

on mouseUp
   put  field fEntry into theText
   put 5 into nLine
   put 7 into nWord
   if MalteCharIndex(  theText, nWord, nLine, tStart, tEnd) then
  select  char tStart to tEnd of fld fEntry
   else
  beep
   end if
end mouseUp

Did a couple of tests and looks good so far.

Sure, a lot of room for improvement.

Thierry



Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage

___
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


  1   2   3   4   >