FinalVersion Posted June 2, 2009 Share Posted June 2, 2009 (edited) Say I navigate to a webpage, it loads, then for example i want to execute: java script:onForgetMe(0); How can I do this? In ie btw. Edited June 2, 2009 by Godly [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Bert Posted June 2, 2009 Share Posted June 2, 2009 umm, dumb question, but why do you need for the javascript to fire? Couldn't you just make an autoitscript to do what the javascript does and have that run instead? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
FinalVersion Posted June 2, 2009 Author Share Posted June 2, 2009 umm, dumb question, but why do you need for the javascript to fire? Couldn't you just make an autoitscript to do what the javascript does and have that run instead?I would, but other then what I posted above, I don't know what else it does. Here is a basic run down of what I'm trying to do.1. Launch Ie & Navigate To Page2. Check if a element is enabled, if it is Run the javascript code I posted above. 3. run the rest of the code [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
DaleHohm Posted June 2, 2009 Share Posted June 2, 2009 $sReturn = IEEval($oIE, "onForgetMe(0);") Func IEEval($o_object, $s_eval) Return $o_object.document.parentwindow.eval($s_eval) EndFunc ;==>IEEval Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Ka36ek Posted June 10, 2009 Share Posted June 10, 2009 I tried the example and script gets error "The requested action with object fails" and points to 'parentWindow' му page has 4 frames and one of them has link to java script .ajax.js there is an array I need Link to comment Share on other sites More sharing options...
Ka36ek Posted June 10, 2009 Share Posted June 10, 2009 $oIE2 = _IEAttach ($HWnD2, "Embedded", 1) $oDoc = _IEDocGetObj ($oIE2) If IsObJ($oDoc) Then $sVal = IEEval($oDoc ,"java script:str_pr[2]") $oIE2 = _IEAttach ($HWnD2, "Embedded", 1) $oFrame = _IEFrameGetObjByName ($oIE2, "main_top") $oDoc = _IEDocGetObj ($oFrame) If IsObJ($oDoc) Then $sVal = IEEval($oDoc ,"java script:str_pr[2]") both crashes Can smb explain why? Link to comment Share on other sites More sharing options...
Authenticity Posted June 10, 2009 Share Posted June 10, 2009 I think that you don't need the java script: part, just the rest of the string, though it doesn't suppose to crash what ever it's crashing. 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