Develop Audio

2020-11-22 Thread Sannyasin Brahmanathaswami via use-livecode
I am back to the “Listen” module. That is audio…

Can you send me off list, scripts for

BackPause/PlayForward

A script that opens one music file?

It has been “many moons” that were done…

http://dev.himalayanacademy.com/screenshots/single-music-file.png

Brahmanathaswami
___
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: Getting a real number from scientific notation

2020-11-22 Thread Klaus major-k via use-livecode
Hi Paul,

> Am 22.11.2020 um 21:44 schrieb Paul Dupuis via use-livecode 
> :
> 
> So, if you want to concert form scientific notation to a real number, you can 
> use the "format" function (see dictionary). Example:
> putformat("%1.0f",4.21911E+11) -- outputs 42191100
> Is that shat yo are looking for?

YES, thanks a BUNCH, that is exactly what I need!


Best

Klaus
--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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: Getting a real number from scientific notation

2020-11-22 Thread Paul Dupuis via use-livecode
So, if you want to concert form scientific notation to a real number, 
you can use the "format" function (see dictionary). Example:


putformat("%1.0f",4.21911E+11) -- outputs 42191100

Is that shat yo are looking for?


On 11/22/2020 3:30 PM, Klaus major-k via use-livecode wrote:

Please, this is quite urgent, my customer is waiting impatiently,
so if someone has an idea...


Am 22.11.2020 um 21:25 schrieb Klaus major-k via use-livecode 
:

Hi friends,

see subject.

I have some values in a CSV with this notation
According to the dictionary I tried:
on mouseUp pMouseButton
   put "4.21911E+11" into tSN
   set itemdel to "+"
   put char 1 to -2 of item 2 of tSN into t1
   put item 2 of tSN into t2
   put t1*10^t2 into tRes
   #x*10^y.
end mouseUp

But tRes is also in scientific notation ->  1e+11
When I set a breakpoint and doubleclick that value
the little popup palette shows a real number however!?

What am I missing and is this the correct way to do what I need?

Thanks a lot in advance!

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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: Getting a real number from scientific notation

2020-11-22 Thread Klaus major-k via use-livecode
Please, this is quite urgent, my customer is waiting impatiently,
so if someone has an idea...

> Am 22.11.2020 um 21:25 schrieb Klaus major-k via use-livecode 
> :
> 
> Hi friends,
> 
> see subject.
> 
> I have some values in a CSV with this notation
> According to the dictionary I tried:
> on mouseUp pMouseButton
>   put "4.21911E+11" into tSN
>   set itemdel to "+"
>   put char 1 to -2 of item 2 of tSN into t1
>   put item 2 of tSN into t2
>   put t1*10^t2 into tRes
>   #x*10^y.
> end mouseUp
> 
> But tRes is also in scientific notation ->  1e+11
> When I set a breakpoint and doubleclick that value
> the little popup palette shows a real number however!?
> 
> What am I missing and is this the correct way to do what I need?
> 
> Thanks a lot in advance!

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
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


Getting a real number from scientific notation

2020-11-22 Thread Klaus major-k via use-livecode
Hi friends,

see subject.

I have some values in a CSV with this notation
According to the dictionary I tried:
on mouseUp pMouseButton
   put "4.21911E+11" into tSN
   set itemdel to "+"
   put char 1 to -2 of item 2 of tSN into t1
   put item 2 of tSN into t2
   put t1*10^t2 into tRes
   #x*10^y.
end mouseUp

But tRes is also in scientific notation ->  1e+11
When I set a breakpoint and doubleclick that value
the little popup palette shows a real number however!?

What am I missing and is this the correct way to do what I need?

Thanks a lot in advance!


Best

Klaus
--
Klaus Major
https://www.major-k.de
kl...@major-k.de

___
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 notification app goes into background doesn't seem to work

2020-11-22 Thread Mark Smith via use-livecode
Hi Graham,

So, apparently not 100% accurate but here are the results of some late hour 
testing yesterday (I was also interested in evaluating something I needed to 
occur around the time the date changed, hence the late hour testing.). But as 
you can see, I had 3 ResignActiveNotifications before the first DidBecomeActive 
occurred. 

2:33:58 PM UIApplicationWillResignActiveNotification detected in SS

11:22:40 PM UIApplicationWillResignActiveNotification detected in SS

11:25:50 PM UIApplicationWillResignActiveNotification detected in SS

11:33:19 PM UIApplicationDidBecomeActiveNotification detected in SS

11:33:26 PM UIApplicationWillResignActiveNotification detected in SS

1:21:48 AM UIApplicationDidBecomeActiveNotification detected in SS

1:29:38 AM UIApplicationWillResignActiveNotification detected in SS



> On Nov 21, 2020, at 11:33 PM, Mark Smith  wrote:
> 
> Graham, I think there might be a problem. I just re-enabled this code in one 
> of my applications and the only thing I am seeing is the 
> WillResignActiveNotification message, and not the DidBecomeActiveNotification 
> message. Odd also because it is the exact opposite of what you are seeing, so 
> we are both seeing half of the story, just not the same half :) I’ll keep it 
> enabled and see if I can spot any patterns. 
> 
> Mark
> 
> 
>> On Nov 20, 2020, at 9:48 PM, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> Thanks Mark
>> 
>> I tried exactly your suggestion. For me, the second notification appears 
>> exactly as you say, but the first one doesn’t. It’s likely that I made a 
>> silly mistake but I can’t see what it is. I put other stuff in the log, so 
>> it’s not just a case of the text being overwritten. Obviously the app does 
>> go into the background, since it is detected coming back to the foreground. 
>> This test was on the Xcode simulator, but I got essentially the same results 
>> on a real iPhone.
>> 
>> Strange.
>> 
>> Graham
>> 
>> 
>>> On 20 Nov 2020, at 17:21, Mark Smith  wrote:
>>> 
>>> Hi Graham, you can put something like the following in your handlers and 
>>> then check the log file to see when they were activated.  If you're using 
>>> Xcode you can download your “sandbox”  to your device. You’ll find the log 
>>> file in there. 
>>> put the long time && "UIApplicationWillResignActiveNotification detected" & 
>>> return after url ("file:" & specialFolderPath("documents") & "/log.txt")
>>> 
>>> for example…
>>> 
>>> 10:39:05 AM UIApplicationWillResignActiveNotification detected in Stack 
>>> Script
>>> 10:57:23 AM UIApplicationDidBecomeActiveNotification detected in Stack 
>>> Script
>>> 
>>> 
>>> 
>>> 
 On Nov 20, 2020, at 3:23 PM, Graham Samuel via use-livecode 
 mailto:use-livecode@lists.runrev.com>> 
 wrote:
 
 Thanks to Mark Smith and Henry Lowe, I know that I’m supposed to set up 
 mergNotify for two notifications as below.
 
 I believe I’ve done this, and I’ve set a monitoring action (putting a text 
 into a field) to show that these notifications have happened.
 
 Of course it may be just me, but so far, I only seem to get the 
 notification when the app comes back into the foreground (so logically it 
 must have gone the background first),  but I just don’t get the ‘going in 
 to the background' notification, or at least my monitoring doesn’t work.  
 Is there some trick of timing that I’ve missed?
 
 Graham
 
 
> On 17 Nov 2020, at 20:07, HENRY LOWE via use-livecode 
> mailto:use-livecode@lists.runrev.com>> 
> wrote:
> 
> 
> 
> On iOS use mergNotify as below. Works well for me.
> 
> on openStack
> mergNotify "UIApplicationWillResignActiveNotification"
> mergNotify "UIApplicationDidBecomeActiveNotification"
> end openStack
> 
> on UIApplicationWillResignActiveNotification pUserInfo
> // Your code before the app goes to background
> -- your code here to handle going to the background
> end UIApplicationWillResignActiveNotification
> 
> on UIApplicationDidBecomeActiveNotification pUserInfo
> // Your code after the app comes back to foreground
> -- your code here to handle your app becoming active
> end UIApplicationDidBecomeActiveNotification
> 
> Henry
 
> On 17 Nov 2020, at 23:39, Mark Smith via use-livecode 
> mailto:use-livecode@lists.runrev.com>> 
> wrote:
> 
> And just a reminder that, under iOS, you’ll have to register to receive a 
> “ UIApplicationWillResignActiveNotification” message, and then write a 
> handler to respond to that (PS only register once in your stack script — 
> I learned the hard way). It’s documented under mergNotify in the 
> dictionary (with credit to Elanor for pointing this out to me when my “on 
> shutdownRequest” handlers were being ignored). 
> 
> Jacque, I believe this is what you are looking for to be notified when 
> you go into the