Sign in to follow this  
Followers 0
scatterjoy

Slacker Radio Alarm Clock

4 posts in this topic

Hi, Newbie here thinks there has to be a better way. I want to run slacker radio as an alarm clock. Alarm functions tbd later (help welcome).

This works, but if slacker's window name changes, I could sleep through my day job.

What's the right way to do this? (If slacker radio has this feature, I can't find it, but I'd rather learn how to use AutoIT anyway)

Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE")

WinWaitActive("Google - Windows Internet Explorer")

WinSetState("Google - Windows Internet Explorer","",@SW_MAXIMIZE)

MouseClick("",225,40)

send("http://www.slacker.com/")

send("{ENTER}")

WinSetState("Slacker Personal Radio - Listen to Free Internet Radio Stations - Windows Internet Explorer","",@SW_MAXIMIZE)

Sleep(20000)

MouseClick("",481,386)

Sleep(2000)

MouseClick("",818,386)

Thanks

Slacker_Run_v1.au3

Share this post


Link to post
Share on other sites



Hi, Newbie here thinks there has to be a better way. I want to run slacker radio as an alarm clock. Alarm functions tbd later (help welcome).

This works, but if slacker's window name changes, I could sleep through my day job.

What's the right way to do this? (If slacker radio has this feature, I can't find it, but I'd rather learn how to use AutoIT anyway)

Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE")

WinWaitActive("Google - Windows Internet Explorer")

WinSetState("Google - Windows Internet Explorer","",@SW_MAXIMIZE)

MouseClick("",225,40)

send("http://www.slacker.com/")

send("{ENTER}")

WinSetState("Slacker Personal Radio - Listen to Free Internet Radio Stations - Windows Internet Explorer","",@SW_MAXIMIZE)

Sleep(20000)

MouseClick("",481,386)

Sleep(2000)

MouseClick("",818,386)

Thanks

_IENavigate() ?

Share this post


Link to post
Share on other sites

_IENavigate() ?

jebus495 is totally on the mark, dig into those _IE functions and you're going to feel silly for how easy you should be able to do this.

Share this post


Link to post
Share on other sites

That's the way to do it. For anyone interested:

#include <IE.au3>

$oIE = _IECreate ("http://www.slacker.com/",0,1,1,1)

WinSetState("Slacker Personal Radio - Listen to Free Internet Radio Stations - Windows Internet Explorer","",@SW_MAXIMIZE)

;pause while radio loads and then choose station. Open C:\Program Files\AutoIt3\au3info to use mouse finder and change station

Sleep(20000)

MouseClick("",481,386)

Sleep(2000)

MouseClick("",818,386)

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