Sign in to follow this  
Followers 0
ripdad

Automation for Radio Stations and Internet Streams

7 posts in this topic

Hello all

Can somebody check this script please?

It shows no errors on syntax and it works good.

But, I need to see if it can be done any simpler

or should I leave it alone?

Thanks

Example of WAAM.au3


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites



The seconds to 00 doesn't matter too much.

It was early on, but the script would max the CPU load if I didn't add 1 second to it.

I'll look into it again.

Thanks for your reply


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites

I rechecked the 1 second line.

It does indeed need to be included, or else the script will max the CPU.

It's weird. Does anyone know why this happens?

-- Thanks


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites

Yes you must have a sleep in there, but my point is this

While 1
Sleep(1000); <================================================= sleeping 1 second
If @MIN = 00 and @SEC = 00 Then; <============================= Relying on in seconds
SoundPlay("c:\Podcast\MCID.mp3", 0) ; Plays ID at the top of every hour
Sleep(1000)
EndIf
If @MIN = 55 and @SEC = 00 Then
Run(@ComSpec & " /c " & 'c:\Podcast\download.exe http://64.26.15.101/feeds/FSNBulletin.mp3 /update /output:c:\Podcast', "",@SW_HIDE) ; Downloads the lastest news spot
Sleep(1000)
EndIf

So if 00 seconds occurs while your code is sleeping that particular second, it may well miss it and your sound will not play.

I could be off the mark here so dont take me at my word, but for me, if the sleep had to be that much it would be Sleep(999)


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Ah - I see what you're saying. It has a 1 in 60 chance of missing 00.

Whats the optimal sleep value at that line?

--Thanks


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites

Update: fixed minor issues and formatted

Example of WAAM.au3


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0