Re: Workaround for regular Crash setting (audio) file of player?

2023-07-15 Thread Alan Stenhouse via use-livecode
Hi David This rings a distant bell... not sure, but can you try set the filename of me to empty and then set the filename of me to audioFile to see if that makes a difference? HTH, cheers Alan ___ use-livecode mailing list

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread Paul Dupuis via use-livecode
Oh, another great solutions! On 7/15/2023 8:23 PM, Alex Tweedly via use-livecode wrote: On 15/07/2023 21:29, Paul Dupuis via use-livecode wrote: All good suggestions so far, but not what I was after, which was whether there is any better way to have the script you are setting the newly

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread Alex Tweedly via use-livecode
On 15/07/2023 21:29, Paul Dupuis via use-livecode wrote: All good suggestions so far, but not what I was after, which was whether there is any better way to have the script you are setting the newly created object to, readable, in the script that setup of the new object. If a behavior script

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread Paul Dupuis via use-livecode
That's pretty good! On 7/15/2023 7:14 PM, Geoff Canyon via use-livecode wrote: Custom properties would definitely be my go-to, similar to what others have said. That said, I think the merge command is your friend here. This script in a button does what you want: on mouseUp set the script

Re: Shell + Python?

2023-07-15 Thread Mark Wieder via use-livecode
On 7/15/23 10:05, Geoff Canyon via use-livecode wrote: So any idea why terminal can find python but LC's shell function can't? Your user context is different from LC's shell context. Try put shell("env | grep PATH") # in the message box and env | grep PATH # in terminal If you want to

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread Geoff Canyon via use-livecode
Custom properties would definitely be my go-to, similar to what others have said. That said, I think the merge command is your friend here. This script in a button does what you want: on mouseUp set the script of button "Sample" to \ merge("on mouseUp[[cr]]" &\ "ask

Re: Shell + Python?

2023-07-15 Thread Bob Sneidar via use-livecode
I ran into a similar thing. Older versions of LC worked with anything you could type into the terminal but now basic things return an error. Sent from my iPhone > On Jul 15, 2023, at 10:07, Geoff Canyon via use-livecode > wrote: > > In terminal, this works: > > python -c "print('hello

Re: Convert date

2023-07-15 Thread Mark Smith via use-livecode
Thanks Bob. These examples are all very handy to have. Added to the wiki!! Just kidding, I do think we need a wiki somewhere for these kinds of code snippets but I’m not offering to build it (this year). We’ll have to see how bored I am next year, or, hopefully, someone else will beat me to it.

Re: Field highlited

2023-07-15 Thread Mark Smith via use-livecode
The effective attribute is what I was looking for. As Paul mentioned, if you just say “set the background of… to hiliteColor” you don’t get anything. But if you set it to the “effective hiliteColor” you get the system default (btw, I tried “system hiliteColor” but LC treats it as a syntax

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread Paul Dupuis via use-livecode
All good suggestions so far, but not what I was after, which was whether there is any better way to have the script you are setting the newly created object to, readable, in the script that setup of the new object. If a behavior script is used or properties or objects then I can not read (and

Re: Solved: Writing to Mac Application Support folder

2023-07-15 Thread J. Landman Gay via use-livecode
Good approach. I assume if there is no file in Preferences, you write defaults directly to the container. I got curious and looked at where LC stores its files. They do not have a container. It's mostly in Application Support, in a folder "RunRev" (there's also an older one there named

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread Mark Smith via use-livecode
Another possibility, which is sort of a combination of Alex and Dicks suggestions is to create a “scripts” card and store all of the scripts as readable custom properties. When I have done this in the past I typically just number the scripts (cScript1 … cScriptn) and put some metadata in the

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread David Bovill via use-livecode
This is the same type of problem as deleting an object from a user interaction with the object - but more common use case and I don;t know a good way of doing that either. I use: send "delete_Object" to somewhere in 2 ticks But it is messy and tends to be a bit unreliable in my experience. I

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread J. Landman Gay via use-livecode
On 7/15/23 12:51 PM, Tweedly via use-livecode wrote: Maybe keep the script in a custom property ? That's what I usually do. If the variables or references may change, I use placeholders and the merge command to replace things before setting the script on the control. If it's a very short

Re: Workaround for regular Crash setting (audio) file of player?

2023-07-15 Thread David Bovill via use-livecode
Interesting - I do have two monitors - though the player is on the main default monitor - I will try with the monitor disconnected. On Sat, 15 Jul 2023 at 14:42, Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > Are you on a single monitor or do you have more than 1 display?

Re: Tree Widget - order of titles

2023-07-15 Thread David Bovill via use-livecode
Thanks Brian - that works. I can remove the indent created by the now empty first column by using: set the separatorRatio of widget to 0 However there is still a separator line and if I: set the showSeparator to false Then the indent returns. But it mostly looks OK. On Sat, 15 Jul 2023 at

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread Dick Kriesel via use-livecode
> On Jul 15, 2023, at 8:06 AM, Paul Dupuis via use-livecode > wrote: > > So in the instances where you have a script that creates an object and then > sets the script of that object (example below), what is you best practice for > having the script in a script and still be readable? Hi,

Re: Check connection and timeout

2023-07-15 Thread Ludovic THEBAULT via use-livecode
> Le 14 juil. 2023 à 17:14, Ralph DiMola via use-livecode > a écrit : > > Ludovic, > > Make sure that tsNet is active: > Hello Ralph Thanks. But yes tsnet was initialized. I’ve measured the timeouts in miliseconds and it was always 30003 milliseconds. But it’s only when there is a

Re: What is your best practice for setting a script in a script?

2023-07-15 Thread Tweedly via use-livecode
Maybe keep the script in a custom property ? Or in a “prefs” file ? Or ….. any number of ways of avoiding the exact question you asked ;-) And yes, there’s been a request for “block” text constants for about as long as I’ve used RR/LC - say 20 years. Alex Sent from my iPad > On 15 Jul 2023,

Shell + Python?

2023-07-15 Thread Geoff Canyon via use-livecode
In terminal, this works: python -c "print('hello world')" In LiveCode, this: *put* shell("python -c " & quote & "print('hello world')" & quote) puts this: /bin/sh: line 1: python: command not found while this: *put* shell("pwd") puts this: /Applications/LiveCode 9.6.9.app So any idea

What is your best practice for setting a script in a script?

2023-07-15 Thread Paul Dupuis via use-livecode
So in the instances where you have a script that creates an object and then sets the script of that object (example below), what is you best practice for having the script in a script and still be readable? Example: BUTTON "Make" on mouseUp   local tScript   create button "Sample"   put "on

Re: Tree Widget - order of titles

2023-07-15 Thread Brian Milby via use-livecode
While I don’t know if a way to hide the key, there is a way to get a manual sort by combining the key with a sortable leading value. See the charsToTrimFromKey property. Brian Milby br...@milby7.com > On Jul 15, 2023, at 9:11 AM, David Bovill via use-livecode > wrote: > > Is there a way

Re: Workaround for regular Crash setting (audio) file of player?

2023-07-15 Thread Paul Dupuis via use-livecode
Are you on a single monitor or do you have more than 1 display? It is a known bug that the player object freezes or crashes when petting properties on any monitor but the primary display: https://quality.livecode.com/show_bug.cgi?id=20707 On 7/15/2023 9:07 AM, David Bovill via use-livecode

Re: Convert date

2023-07-15 Thread Alex Tweedly via use-livecode
On 14/07/2023 19:45, Bob Sneidar via use-livecode wrote: Because I’m not that good with regular expressions and the format function. :-) But you example has one too many close parens. Oops - I got caught out copying / pasting again :-( Yes, of course it should have been put

Tree Widget - order of titles

2023-07-15 Thread David Bovill via use-livecode
Is there a way to display an indexed array in the tree widget without displaying the numeric inde items (ie first column)? I'm looking to display an ordered index of titles and would prefer not to use both a field and a tree widget to accomplish this?

Workaround for regular Crash setting (audio) file of player?

2023-07-15 Thread David Bovill via use-livecode
I'm working a lot with media again - and the last two days I get a crash every 15 minutes when I set the filename of a player to various mp4 audio tracks. I'd love a workaround as its slowing things up quite a bit. I've seen this behavior quite a bit over the years with media and the player. it

Re: Convert date

2023-07-15 Thread Alex Tweedly via use-livecode
On 14/07/2023 16:13, Bob Sneidar via use-livecode wrote: I beg to differ. Again, Livecode is a way to build both the tools and the product made by those tools. Livecode is NOT a collection of every conceivable tool for everything everyone wants to do. No language is. I think the LC dev team

Re: Search for an app in Google Play Store

2023-07-15 Thread Klaus major-k via use-livecode
Hi Jacques, > Am 14.07.2023 um 22:36 schrieb J. Landman Gay via use-livecode > : > > On 7/14/23 7:16 AM, Klaus major-k via use-livecode wrote: >> I am looking for a support email at GOOGLE Dev. >> My problem is the search engine of Google Play Store. >> Just like the subject says. ;-) > > Oh

Re: Field highlited

2023-07-15 Thread Richmond via use-livecode
It is really very easy to do this sort of thing: set the hilitecolor of fld "f1" to red Best, Richmond. On 14.07.23 23:39, J. Landman Gay via use-livecode wrote: On 7/14/23 11:14 AM, Mark Smith via use-livecode wrote: BTW, is there a way of determining the default highlight colour? The