Sign in to follow this  
Followers 0
DAGAZ

Control over Screamer Radio

8 posts in this topic

#1 ·  Posted (edited)

Hi 2 @ll coders,

Possible?

What I want to do is to write an au3 which starts Radio Screamer (http://www.screamer-radio.com/) at a given time, sets the station I want to record, pushes the PLAY button, then whenever the stream is received, pushes the REC button.

I do not now how to tell the script when the scream is really received. In other words .. is music coming or is the stream / internet connection gone, cause it makes no sense to record silence :-)

Also want to stop the recording at a given time.

Can this be done with autoit??

Thanks for any ideas and help

DAGAZ

Edited by DAGAZ

..naq gura V jnf prafberq

Share this post


Link to post
Share on other sites



Well, got it to start and record. So far no timer built in, 'cause I do not know how to do it yet :-)

I need help on how to get the window title of Screamer radios window. The title is constantly replaced with the playing song.

Reason for knowing : i want to make sure a stream is received, because if not, the title does not change and the script should not push the record button.

I tried :

$title = WinGetTitle("[Class:32770]", "")

$title returns 0 and not the "text"

Anyone knows how to program a start and stop timer?

Here is what I have so far.

;AU3 to start Screamer Radio, Record and Stop
;www.screamer-radio.com

;Set start time (Do not know how to do it ...yet)

;Fire up Screamer Radio
Run("C:\Screamer Radio\screamer.exe")

;Wait for the window "Screamer Radio" to exist and wait 3 sec.otherwise the script misses hitting the play button :-(
WinWait("Screamer Radio")
Sleep (3000)

;Push the play button
ControlClick ("Screamer", "",1002)

;Wait 10 seconds for stream to start (hopefully)
Sleep (10000)

;Push the Record button to start recording
;Can not figure out how to get the changing window titles of the Screamer Radio window to see if there is a song playing
;ID 1047 = Rec button
ControlClick ("","",1047)

;here goes the timer code...duration of recording, etc...Hmmm...so far only testing 
Sleep (20000)

;Push REC/Stop button. Only works IF Screamer Radio window is still the top window
; ID 1047 = Rec button
;Push Record button to stop recording
ControlClick ("","",1047)
Sleep (2000)

;ID 1003 = Stop button
;Push Stop button to stop stream
ControlClick ("","",1003)

;Wait 3 seconds for  Screamer's Window title is set back
Sleep (3000)

WinClose("Screamer", "")

Exit

Thanks for any help


..naq gura V jnf prafberq

Share this post


Link to post
Share on other sites

for the timer refer to timerinit() and timerdiff() from help file..

$begin = TimerInit()
sleep(3000)
$dif = TimerDiff($begin)
MsgBox(0,"Time Difference",$dif)

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

Manjish,

i guess I explained it wrong.. With timer I mean something where I can set a start and stop time.

Guess I need to make a GUI as well.

The helpfile you refer to shows me the difference between start and stop.

thanks for the tip


..naq gura V jnf prafberq

Share this post


Link to post
Share on other sites

ya.. u'll have to make two buttons.. if u want to start and stop the timers..

about ur wingetitle, well can u tell me some part of the window title that never changes.. irrespective of the song.. there will be some part.. u can use it to get the complete title.. and then compare it with whatever u want, to decide whether the song has started or not..

Here i am asuming "scr" is there in the title, which never changes.. u can replace it with whatever the real thing is..

AutoItSetOption("WinTitleMatchMode",2)
msgbox(4096,"",WinGetTitle("Scr",""))

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

hey just downloaded screamer.. and found a solution for ur WinGetTitle problem..

The "information" text never changes, irrespective of the title.. station, text etc..use it like this

AutoItSetOption("WinTitleMatchMode",2)
msgbox(4096,"",WinGetTitle("","Information"))

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

hey just downloaded screamer.. and found a solution for ur WinGetTitle problem..

The "information" text never changes, irrespective of the title.. station, text etc..use it like this

AutoItSetOption("WinTitleMatchMode",2)
msgbox(4096,"",WinGetTitle("","Information"))
Thanks a lot Manjish,

Hope you like Screamer

It works great... I have to figure out why and how it works. I am new to AutoIt.

Anyway, thanks. Now i can use WinClose:

AutoItSetOption("WinTitleMatchMode",2)
WinClose (WinGetTitle("","Information"),"")

Ok.. now what's left is to study the help file and learn more of autoit's syntax to get my GUI and timer working

Thanks again.

Edited by DAGAZ

..naq gura V jnf prafberq

Share this post


Link to post
Share on other sites

Sure.. no problem..

Post here if u need anything more..


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

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