harvlake 0 Posted April 23, 2014 Hi, I hope you can help me out. I am creating a script to open IE for a radio station then click a javascript button to open their popup player. Everything works fine, now how do I close the the individual windows when I am ready? Here is my code so far that works for opening the windows. Local $oIE = _IECreate("http://kykn.com") Local $PopupWindow = _IENavigate($oIE,"javascript:openPlayer('KYKN');") Thanks in advance. Share this post Link to post Share on other sites
JohnOne 1,603 Posted April 23, 2014 Be specific about the individual window. And post whole code. 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
harvlake 0 Posted April 23, 2014 (edited) Here is the full code I tried. By individual windows, I mean the original IE window and the Popup window. #include <Constants.au3> #include <IE.au3> #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.10.2 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- Local $oIE = _IECreate("http://kykn.com") Local $PopupWindow = _IENavigate($oIE,"javascript:openPlayer('KYKN');") WinWait(30000) _IEQuit($PopupWindow) MsgBox($MB_SYSTEMMODAL,"test","Ok") Edited April 23, 2014 by harvlake Share this post Link to post Share on other sites
Danp2 880 Posted April 23, 2014 You can't use the return value from _IENavigate like that. You will need to get a reference to the popup window (try _IEAttach) and then use that to close the window. [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
JohnOne 1,603 Posted April 23, 2014 I'd probably try winclose for popup and of course _IEQuit for Created IE 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
Palestinian 13 Posted April 24, 2014 The javascript button leads to static address I believe, you could use _IECreat with that address. #include <Constants.au3> #include <IE.au3> #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.10.2 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- Local $oIE = _IECreate("http://radio.securenetsystems.net/v5/KYKN") ;~ _IENavigate($oIE,"javascript:openPlayer('KYKN');") Sleep(30000) _IEQuit($oIE) MsgBox($MB_SYSTEMMODAL,"test","Ok") Share this post Link to post Share on other sites
ahirbe 0 Posted April 24, 2014 I am trying to select a specific box in a multiple choice item, currently i have everything right except clicking the right box for the 3rd (ans3) and 4th (ans4) questions, my code only fills out the first choice for each question...here is my code #include <IE.au3> Call ("Vote") Func Vote () Global $oIE = _IECreate ("http://freeonlinesurveys.com/app/rendersurvey.asp?sid=zxus46gaw6qp49g452964&refer=") Local $vote1 = _IEGetObjByName ($oIE, "ans1") Local $vote2 = _IEGetObjByName ($oIE, "ans2") Local $vote3 = _IEGetObjByName ($oIE, "ans3") Local $vote4 = _IEGetObjByName ($oIE, "ans4") _IEFormElementSetValue ($vote1, "1") _IEFormElementSetValue ($vote2, "2") _IEFormElementSetValue ($vote3, "3") _IEFormElementSetValue ($vote4, "3") _IEAction ($vote1, "click") _IEAction ($vote2, "click") _IEAction ($vote3, "click") _IEAction ($vote4, "click") EndFunc Share this post Link to post Share on other sites
Palestinian 13 Posted April 25, 2014 ahribe you obviously didn't read the forum rules, go have a look and then reconsider your question Share this post Link to post Share on other sites