Sign in to follow this  
Followers 0
robinsiebler

Dealing with Flash objects

8 posts in this topic

Every day, I launch the 'Sirius Player' to listen to music, so I thought I would try automate this. In order to launch the player, you have to go to the main page (http://www.sirius.com) and click on the 'Listen' button, which is part of a Flash object. So far, the only way I have found is to move the mouse to the position 'Listen' should be and click there. That worked 3 times in a row, but on the 4th, for some reason, the mouse moved over 'Activate'. Is there a better way to do this?

Opt("MouseCoordMode", 0) 
Dim $pos[2]
$ietitle = "Microsoft Web-MSWeb - Microsoft Internet Explorer"
$playertitle = "http://mpcache.sirius.com - Welcome to the SIRIUS Player - Microsoft Internet Explorer"
Run("c:\Program Files\Internet Explorer\IEXPLORE.EXE")
WinWaitActive($ietitle)
$handle = WinGetHandle($ietitle)
ControlClick($ietitle, "", "Edit2")
Send("http://www.sirius.com{ENTER}")
Sleep(10000) 
$pos[0] = 808
$pos[1] = 218
MouseClick("left", $pos[0], $pos[1])
WinWaitActive($playertitle)
WinWait("AutoFill - RoboForm")
ControlClick("AutoFill - RoboForm", "", "Button2")
WinActivate($playertitle)
$pos[0] = 260
$pos[1] = 438
MouseClick("left", $pos[0], $pos[1])
WinClose($handle)

Share this post


Link to post
Share on other sites



this worked for me... mine is edit1.. not edit2

ControlClick($handle, "", "Edit1")
Send("http://www.sirius.com{ENTER}")
Sleep(10000)
ControlClick($handle, "", "Edit1")
Send(" javascript:openMediaPlayer('MediaPlayer','','');{ENTER}")

8)

after accepting cookies from the site... which you probably already have set


NEWHeader1.png

Share this post


Link to post
Share on other sites

How did you get that javascript command?

Share this post


Link to post
Share on other sites

he probly got if from one of the external js files.

(search for "<script src=" )

no... actually i went to the " site map" and just hovered over the "listen" and saw the javascript on the bottom left of my screen... so

i right clicked on the "listen" ( while in the site map ) , then clicked properties and copied the link

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

You're so smart! B)

Share this post


Link to post
Share on other sites

You're so smart! :o

naaa....

Just got lucky... B)

8)


NEWHeader1.png

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