Ramius Posted April 21, 2009 Share Posted April 21, 2009 (edited) Hi there, I am new here, but i will try to read / search all, but now i have i problem i don't understand. I have found this script. CODE#include <IE.au3> $Html = '<html>' & @CRLF _ &'<head>' & @CRLF _ &'<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' & @CRLF _ &'<title></title>' & @CRLF _ &'<meta name="description" content="">' & @CRLF _ &'<meta name="keywords" content="">' & @CRLF _ &'<meta name="author" content="iperezm@interactive.net.ec">' & @CRLF _ &'<meta name="generator" content="AceHTML 5 Freeware">' & @CRLF _ &'<script type=text/javascript>' & @CRLF _ &'function JsMsgBox(pMsg){' & @CRLF _ &'alert(pMsg);' & @CRLF _ &'}' & @CRLF _ &'</script>' & @CRLF _ &'</head>' & @CRLF _ &'<body>' & @CRLF _ &'Time to get som..' & @CRLF _ &'</body>' & @CRLF _ &'</html>' $oIE=_IECreate() _IEDocWriteHTML ( $oIE, $Html ) $oIE.document.parentwindow.execScript('JsMsgBox("beer");', 'javascript') And i have changed the javascript with this, and offcause the call for the function at the end, but now i'm just getting error message 'The requested action with this object has failed' can somebody give me a hints? It should be blinking the Div id 1 ? CODE#include <IE.au3> $Html = '<html>' & @CRLF _ &'<head>' & @CRLF _ &'<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' & @CRLF _ &'<title></title>' & @CRLF _ &'<meta name="description" content="">' & @CRLF _ &'<meta name="keywords" content="">' & @CRLF _ &'<meta name="author" content="iperezm@interactive.net.ec">' & @CRLF _ &'<meta name="generator" content="AceHTML 5 Freeware">' & @CRLF _ &'<script type=text/javascript>' & @CRLF _ & 'function blinkit(){' & @CRLF _ & 'intrvl=0;' & @CRLF _ & 'for(nTimes=0;nTimes<15;nTimes++){' & @CRLF _ & 'intrvl += 500;' & @CRLF _ & 'setTimeout("document.getElementById("1").style.color="red";",intrvl);' & @CRLF _ & 'setTimeout("document.getElementById("1").style.background="black";",intrvl);' & @CRLF _ & 'intrvl += 500;' & @CRLF _ & 'setTimeout("document.getElementById("1").style.color="";",intrvl);' & @CRLF _ & 'setTimeout("document.getElementById("1").style.background="";",intrvl);' & @CRLF _ & ' }' & @CRLF _ & '}' & @CRLF _ & '// End -->' & @CRLF _ &'</script>' & @CRLF _ &'</head>' & @CRLF _ &'<body>' & @CRLF _ &'<div id = 1>Time to get som..</div>' & @CRLF _ &'</body>' & @CRLF _ &'</html>' $oIE=_IECreate() _IEDocWriteHTML ( $oIE, $Html ) $oIE.document.parentwindow.execScript('blinkit();', 'javascript') Regards Ramius Edited April 21, 2009 by Ramius Link to comment Share on other sites More sharing options...
Ramius Posted April 22, 2009 Author Share Posted April 22, 2009 Bug found :-) case closedRamiusHi there,I am new here, but i will try to read / search all, but now i have i problem i don't understand.I have found this script.CODE#include <IE.au3>$Html = '<html>' & @CRLF _ &'<head>' & @CRLF _ &'<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' & @CRLF _ &'<title></title>' & @CRLF _ &'<meta name="description" content="">' & @CRLF _ &'<meta name="keywords" content="">' & @CRLF _ &'<meta name="author" content="iperezm@interactive.net.ec">' & @CRLF _ &'<meta name="generator" content="AceHTML 5 Freeware">' & @CRLF _ &'<script type=text/javascript>' & @CRLF _ &'function JsMsgBox(pMsg){' & @CRLF _ &'alert(pMsg);' & @CRLF _ &'}' & @CRLF _ &'</script>' & @CRLF _ &'</head>' & @CRLF _ &'<body>' & @CRLF _ &'Time to get som..' & @CRLF _ &'</body>' & @CRLF _ &'</html>'$oIE=_IECreate()_IEDocWriteHTML ( $oIE, $Html )$oIE.document.parentwindow.execScript('JsMsgBox("beer");', 'javascript')And i have changed the javascript with this, and offcause the call for the function at the end, but now i'm just getting error message 'The requested action with this object has failed'can somebody give me a hints? It should be blinking the Div id 1 ?CODE#include <IE.au3>$Html = '<html>' & @CRLF _ &'<head>' & @CRLF _ &'<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' & @CRLF _ &'<title></title>' & @CRLF _ &'<meta name="description" content="">' & @CRLF _ &'<meta name="keywords" content="">' & @CRLF _ &'<meta name="author" content="iperezm@interactive.net.ec">' & @CRLF _ &'<meta name="generator" content="AceHTML 5 Freeware">' & @CRLF _ &'<script type=text/javascript>' & @CRLF _ & 'function blinkit(){' & @CRLF _ & 'intrvl=0;' & @CRLF _ & 'for(nTimes=0;nTimes<15;nTimes++){' & @CRLF _ & 'intrvl += 500;' & @CRLF _ & 'setTimeout("document.getElementById("1").style.color="red";",intrvl);' & @CRLF _ & 'setTimeout("document.getElementById("1").style.background="black";",intrvl);' & @CRLF _ & 'intrvl += 500;' & @CRLF _ & 'setTimeout("document.getElementById("1").style.color="";",intrvl);' & @CRLF _ & 'setTimeout("document.getElementById("1").style.background="";",intrvl);' & @CRLF _ & ' }' & @CRLF _ & '}' & @CRLF _ & '// End -->' & @CRLF _ &'</script>' & @CRLF _ &'</head>' & @CRLF _ &'<body>' & @CRLF _ &'<div id = 1>Time to get som..</div>' & @CRLF _ &'</body>' & @CRLF _ &'</html>'$oIE=_IECreate()_IEDocWriteHTML ( $oIE, $Html )$oIE.document.parentwindow.execScript('blinkit();', 'javascript')RegardsRamius 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