Re: Do javascript function in browser widget?

2018-11-06 Thread Keith Clarke via use-livecode
Thanks for the link, Herman - some interesting use cases there …once I’ve got the connectivity in place. :-) Best, Keith > On 6 Nov 2018, at 10:42, hh via use-livecode > wrote: > > Browser widget usage examples: > http://forums.livecode.com/viewtopic.php?f=93=29018 > >

Re: Do javascript function in browser widget?

2018-11-06 Thread Keith Clarke via use-livecode
Thanks Andre for the detailed response and HTTPD library steer - that’s new to me so I shall review with interest. :-) I’m not in control of the pages, so that may be more useful than my first experiments - which were to download the page content into LC, add some markup and load the HTML text

Do javascript function in browser widget?

2018-11-06 Thread Keith Clarke via use-livecode
Folks, I’ve found a few examples of simple inline script injection to the browser widget, such as do "document.body.style.background = ‘red';" in widget "Browser” Is it possible to inject a multi-line javascript function - with variables definition, loops, etc - in this fashion or would the

Re: How best to check if string contains any of a list of substrings?

2018-11-01 Thread Keith Clarke via use-livecode
to go there :-) > > Are you expecting reallylarge strings to search ? Or really many phrases to > search for ? > > "beware optimizing something that is just plain fast enough already" > > Alex. > > On 01/11/2018 09:41, Keith Clarke via use-livecode wrote: &

How best to check if string contains any of a list of substrings?

2018-11-01 Thread Keith Clarke via use-livecode
Folks, What is the most efficient way to test whether a variable containing a string such as “my test phrase” contains one of several variable substrings, such as “est” OR “phr” OR... ? So far I’ve tried (without luck) approaches that simplify into... put “my test phrase” into myTestPhrase put

Re: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Keith Clarke via use-livecode
Perfect, thanks Devin - I was hoping to see ‘offsets’ in the docs under ‘offset’, so this will do nicely! :-) Best, Keith > On 29 Oct 2018, at 15:49, Devin Asay via use-livecode > wrote: > > On Oct 29, 2018, at 9:32 AM, Keith Clarke via use-livecode > wrot

How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Keith Clarke via use-livecode
Folks, Is there a simple way to find the offset of a character from the ‘right’ end of a string, rather than the beginning - or alternatively get a list of all occurrences? I’m trying to separate paths & pages from a list of URLs and so looking to identify the position of the last ‘/‘

Re: How to find true words that start with a capital letter?

2018-10-28 Thread Keith Clarke via use-livecode
? Or is it really just ASCII ? > > if so, you could do > >put char 1 of tWord into temp >if 65 <= temp AND temp <= 90 then ... > > Alex. > > > > On 26/10/2018 12:21, Keith Clarke via use-livecode wrote: >> Folks, >> What is th

How to find true words that start with a capital letter?

2018-10-26 Thread Keith Clarke via use-livecode
Folks, What is the most efficient way to search for trueWords starting with a capital letter? Is there anything more direct than something like... repeat for each true word tWord in tContainer If char 1 of tWord is among the codePoints of tUnicodeLetters // a variable containing A-Z

Re: Searching for a word when it's more than one word

2018-09-01 Thread Keith Clarke via use-livecode
Very interesting Steve, your use case is actually very close to what I’m trying to achieve, which is to identify keywords and phrases within a corpus of text - think prioritised ’tag cloud’ metadata. My original plan (as a non-programmer) was to identify the most popular unique words within

Re: How to get word offset all instances of a string in a chunk of text?

2018-08-31 Thread Keith Clarke via use-livecode
Thanks Alex, HH & Jim for all the help & ideas. Just to close out the thread with a solution for future reference, the code below now extracts from a text source a list of unique words, cleaned up against a noise-word list, with word frequency, word & and a comma-delimited string of the word

How to get word offset all instances of a string in a chunk of text?

2018-08-30 Thread Keith Clarke via use-livecode
Folks, Is there a single-pass mechanism or more efficient way of returning the wordOffset of each instance of ‘the’ in ‘the quick brown fox jumped over the lazy dog’ than to use two passes through the text? Pass-1. Count the instances of ‘the’ into an array and then Pass-2. Repeat for the count

Re: Word counter crashing LiveCode?

2018-08-25 Thread Keith Clarke via use-livecode
Thanks Alex & Paul - that’s working nicely now. It has also introduced me to: A unicode text subtlety that I’d missed since I last dabbled with LiveCode pre-7 Arrays, with a useful worked example, which are clearly more efficient for this kind of process but a learning curve that I’d been

Word counter crashing LiveCode?

2018-08-25 Thread Keith Clarke via use-livecode
Folks, I’m working on a simple utility to count the most popular words in a text file but my current code runs for a while & then causes LiveCode to crash. It runs fine when I merely extract a list of unique words that are not in a ‘NoiseWords’ list but when I attempt to add a word count as the

Re: How to filter a list with a variable anywhere in a line

2018-08-13 Thread Keith Clarke via use-livecode
d in the middle of > attempting to explain it, the author loses his mind. It was pretty funny. > > Bob S > > >> On Aug 13, 2018, at 09:01 , Keith Clarke via use-livecode >> wrote: >> >> Indeed, especially when anything regexy should be viewed from a safe >

Re: How to filter a list with a variable anywhere in a line

2018-08-13 Thread Keith Clarke via use-livecode
Indeed, especially when anything regexy should be viewed from a safe distance - ideally from behind the couch …in a tin-foil hat! > On 13 Aug 2018, at 16:54, Mark Wieder via use-livecode > wrote: > > On 08/13/2018 08:51 AM, Keith Clarke via use-livecode wrote: >> Thanks

Re: How to filter a list with a variable anywhere in a line

2018-08-13 Thread Keith Clarke via use-livecode
ivecode > wrote: > > On 08/13/2018 08:32 AM, Keith Clarke via use-livecode wrote: >> Folks, >> I’m trying to filter a list of comma-delimited values to include only the >> lines that contain a string - somewhere in any of the items. >> What’s wrong with this sy

How to filter a list with a variable anywhere in a line

2018-08-13 Thread Keith Clarke via use-livecode
Folks, I’m trying to filter a list of comma-delimited values to include only the lines that contain a string - somewhere in any of the items. What’s wrong with this syntax - it’s currently returning no lines when I can see tString in the second line of the variable? filter lines of tList with

Re: How to get LiveCode to return 'Today' & 'Now'?

2018-08-09 Thread Keith Clarke via use-livecode
Thanks Brian (& Tore) - a brain-fade meant I clearly forgot ‘the obvious’ syntax :-) Best, Keith > On 9 Aug 2018, at 14:57, Brian Milby via use-livecode > wrote: > > the date > the time > > Thanks, > Brian > On Aug 9, 2018, 8:56 AM -0500, Keith Clarke via

How to get LiveCode to return 'Today' & 'Now'?

2018-08-09 Thread Keith Clarke via use-livecode
Hi folks, Please can anyone share the magic syntax to put today into tDate put now into the tTime I haven’t found a magic keyword to seed the docs or Google. Thanks Keith ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit

Re: LiveCode Server on CentOS 6?

2018-08-01 Thread Keith Clarke via use-livecode
Thanks Richard & Brian for digging into this. Lacking the Linux knowledge I tried working backwards from LC Server 9.0, trying 8.0 and 7.14 with no joy (internal server 500 error codes) - though whether the issues are down to glibc version dependencies is beyond me. Earlier versions have

Re: LiveCode Server on CentOS 6?

2018-07-31 Thread Keith Clarke via use-livecode
Thanks Martin (& Brian). It transpires that the VPS in question only has CentOS 6 OS option, even if recreated - so the OS is a given for the short term, pending replacement / upgrade discussions with the hosting provider, which are not my call. One option to get underway might be to deploy an

Re: LiveCode Server on CentOS 6?

2018-07-30 Thread Keith Clarke via use-livecode
> First question (an admittedly ignorant one, but I haven't spent much time in > the CentOS community): Why does their package manager not automatically keep > system components current? CentOS 6 is not the latest version (and will be unsupported from 2020), so I guess there are

Re: LiveCode Server on CentOS 6?

2018-07-29 Thread Keith Clarke via use-livecode
ooks like server migration / rebuild will need to be on the critical path or it’s a dead-end for experimenting with LC Server for this particular project. Thanks Keith > On 29 Jul 2018, at 08:06, Warren Samples via use-livecode > wrote: > > On 07/28/2018 05:39 AM, Keith Clarke

LiveCode Server on CentOS 6?

2018-07-28 Thread Keith Clarke via use-livecode
Hi Folks, Is anyone running LS Server on CentOS 6? I notice that only version 7 is officially supported and not being a Linux expert, I’d like to know if this server OS would need to be upgraded before attempting anything with LC server on it. TIA Keith

Re: OT: On-Rev cPanel (port 2083) access blocked by BT Smart Hub router?

2018-07-27 Thread Keith Clarke via use-livecode
> On 07/27/2018 09:06 AM, Keith Clarke via use-livecode wrote: >> Hi folks, >> Apologies for OT thread - but I’m hoping there may be a UK-based fellow >> on-rev hosting user, with BT Broadband + Smart Hub, who can confirm whether >> any router tweaks are needed to

OT: On-Rev cPanel (port 2083) access blocked by BT Smart Hub router?

2018-07-27 Thread Keith Clarke via use-livecode
Hi folks, Apologies for OT thread - but I’m hoping there may be a UK-based fellow on-rev hosting user, with BT Broadband + Smart Hub, who can confirm whether any router tweaks are needed to access port 2083 (for on-rev cPanel), which seems to be blocked from any device on my home network (BT

Re: Example of Livecode function settings array syntax?

2018-07-24 Thread Keith Clarke via use-livecode
56-how-to-upload-a-file-using-FTP > > The same method works for all tsNet functions that accept a settings > parameter. > > Please let me know if that answers your question, > > Regards, > > Charles > >> On 24 Jul 2018, at 6:15 pm, Keith Clarke via use-livecode

Example of Livecode function settings array syntax?

2018-07-24 Thread Keith Clarke via use-livecode
Hi folks, I’m trying to add username & password to the pSettings parameter in the tsNetPost function but have no clue on the correct syntax for settings parameter arrays. Unfortunately, the documentation is not helpful in this regard for the infrequent user - no brief syntax description, code

Re: LiveCode server IDE - the current state of the art?

2018-07-22 Thread Keith Clarke via use-livecode
else > put ("libraryscripts/" & tFile) into tt > end if > start using stack tt > end repeat > > put "user/scripts/siteConfig.lc" into tt > if there is a file tt then > start using stack tt > siteConfig > end if > > --

Re: OAuth2 Library troubleshooting

2018-07-20 Thread Keith Clarke via use-livecode
GSoVim8FfJkZEqxbjaFbberKGk > 3 > 8v8AnYrvChG4qJbQo8_token=5Aep8614iLM.Dq661ePDmPEgaAW9Oh_L3JKkDpB4xR > 4 > eb54_pZfVti1dPEk8aimw4Hr9ne7VXXVSIQ%3D%3D_in=7200=mystate > > I hope this helps > > Sean Cole > Pi Digital > >> On 20 Jul 2018, at 17:11, Keith Clarke via use-livecode >> w

OAuth2 Library troubleshooting

2018-07-20 Thread Keith Clarke via use-livecode
Hi folks, I’m trying to access the Salesforce.com REST API from LiveCode via their UserAgent flow https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_user_agent_oauth_flow.htm

Re: LiveCode server IDE - the current state of the art?

2018-07-20 Thread Keith Clarke via use-livecode
> when there are larger or complex changes to do). > > Only problem I've run into with this approach is that sometimes I will > edit and test a file (or a number of files)? locally, and forget to > upload one or some :-(? So I have a small 'sync' app which runs on the > laptop, and uses

LiveCode server IDE - the current state of the art?

2018-07-19 Thread Keith Clarke via use-livecode
Hi folks, I’m attempting to engage with LiveCode Server after a couple of years since I last played - when the approach was to roll your own IDE (i.e. pick a text editor) and optionally use the RevIgnitor framework. I’d be obliged if anyone could please update me on the current state of the art

Re: How to save to local file via native file dialogue?

2017-03-10 Thread Keith Clarke via use-livecode
om> wrote: > > Didn't someone go insane once trying to do something similar? > > Bob S > > >> On Mar 10, 2017, at 08:50 , Keith Clarke via use-livecode >> <use-livecode@lists.runrev.com> wrote: >> >> Hi Folks, >> I’m building a little utility to

How to save to local file via native file dialogue?

2017-03-10 Thread Keith Clarke via use-livecode
Hi Folks, I’m building a little utility to parse a regular html report file I get into CSV form to slice & dice with Excel. Input & transformation phases are sorted. Input processing uses 'answer file' to select a source file via the native file dialogue, set the defaultFolder and load the

<    1   2