robinsiebler Posted October 26, 2005 Share Posted October 26, 2005 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) Link to comment Share on other sites More sharing options...
Valuater Posted October 26, 2005 Share Posted October 26, 2005 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 Link to comment Share on other sites More sharing options...
w0uter Posted October 26, 2005 Share Posted October 26, 2005 omg wow, i never knew you could send java script: commands into the brouwser. thanks. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
robinsiebler Posted October 26, 2005 Author Share Posted October 26, 2005 How did you get that javascript command? Link to comment Share on other sites More sharing options...
w0uter Posted October 27, 2005 Share Posted October 27, 2005 he probly got if from one of the external js files. (search for "<script src=" ) My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Valuater Posted October 27, 2005 Share Posted October 27, 2005 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... soi right clicked on the "listen" ( while in the site map ) , then clicked properties and copied the link8) Link to comment Share on other sites More sharing options...
robinsiebler Posted October 27, 2005 Author Share Posted October 27, 2005 You're so smart! Link to comment Share on other sites More sharing options...
Valuater Posted October 27, 2005 Share Posted October 27, 2005 You're so smart! naaa....Just got lucky... 8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now