taren9k3 Posted May 23, 2009 Posted May 23, 2009 (edited) <script>var a=1</script>I have this script.How to set a value to 123 by using autoit script.thanks Edited May 24, 2009 by taren9k3
Authenticity Posted May 23, 2009 Posted May 23, 2009 (edited) #include <IE.au3> Dim $oIE, $oScripts, $oScript $oIE = _IECreate('http://www.google.com/') ConsoleWrite('a variable is: ' & IEEval($oIE, 'a') & @LF) ;$oScript = $oIE.document.scripts(2) ;ConsoleWrite(_IEPropertyGet($oScript, 'innerhtml') & @LF) ;IEEval($oScript, 'a=123') IEEval($oIE, 'a=123') ConsoleWrite('a variable is: ' & IEEval($oIE, 'a') & @LF) ; Thanks DaleHohm for the code. Func IEEval($o_object, $s_eval) Return $o_object.document.parentwindow.eval($s_eval) EndFunc ;==>IEEval Edited May 23, 2009 by Authenticity
taren9k3 Posted May 23, 2009 Author Posted May 23, 2009 How do you know document.parentwindow.eval($s_eval) Where can I find document.name.value,.... Can you tell me.
Authenticity Posted May 24, 2009 Posted May 24, 2009 Hi, heh sorry for not replying here. I didn't know about it, it's from another thread the DaleHohm posted. It's not documented here yet but I believe that the Window object exposes it as well as the execScript method which, if I understand it correctly, does the same as eval.
Stilgar Posted May 24, 2009 Posted May 24, 2009 (edited) How do you know document.parentwindow.eval($s_eval)Where can I find document.name.value,....Can you tell me.That's only Java-Script:http://www.w3schools.com/jsref/jsref_eval.aspeval on the DOM-element document.parentwindow. Edited May 24, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF
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