Erpaaz Posted May 14, 2021 Posted May 14, 2021 Hi i'm beginner with AutoIT, and i'm looking to understand why I can't use this line in HTML/CSS in my GUI : "animation: marquee 7s linear infinite;" Because nothing appears, I try with "_IEDocInsertHTML", same result.. CSS : .marquee p { font-size: 50px; display: inline-block; padding-left: 100%; animation: marquee 7s linear infinite; } @keyframes marquee { 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } } Script : #include <IE.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> $url = "C:\Users\33782\Desktop\AutoIT\HTML\marqueegui.html" $IE = _IECreateEmbedded() GUICreate("", $DesktopHeight/2, $DesktopWidth, -1, 0, $WS_POPUP) $IEobject = GUICtrlCreateObj($IE, -1, -1, @DesktopWidth, @DesktopHeight) GUISetState(@SW_SHOW) _IENavigate($IE, $url) $testText = '<body><div class='&'"'&'marquee'&'">'&'<p>Marquee here</p></div></body></html> $test = _IETagNameGetCollection($IE, "body", 0) _IEDocInsertHTML($test, $testText, "beforeend") While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit Sleep(100) WEnd
Subz Posted May 15, 2021 Posted May 15, 2021 Have you tried using file url i.e. $url = "file:///C:/Users/33782/Desktop/AutoIT/HTML/marqueegui.html"
Gianni Posted May 15, 2021 Posted May 15, 2021 ... more or less something like this : expandcollapse popup#include <IE.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> ; $url = "C:\Users\33782\Desktop\AutoIT\HTML\marqueegui.html" $IE = _IECreateEmbedded() GUICreate("", @DesktopWidth, 90, 0, 0, $WS_POPUP) $IEobject = GUICtrlCreateObj($IE, 0, 0, @DesktopWidth, 90) GUISetState(@SW_SHOW) _IENavigate($IE, "about:blank") ; $url) Local $testText = _ "<!DOCTYPE HTML>" & @CRLF & _ "<html>" & @CRLF & _ "<head>" & @CRLF & _ " <meta http-equiv=""X-UA-Compatible"" content=""IE=edge"" />" & @CRLF & _ " <style style='text/css'>" & @CRLF & _ " .marquee p {" & @CRLF & _ " position: absolute;" & @CRLF & _ " width: 100%;" & @CRLF & _ " height: 100%;" & @CRLF & _ " margin: 0;" & @CRLF & _ " text-align: center;" & @CRLF & _ " font-size: 50px; " & @CRLF & _ " display: inline-block; " & @CRLF & _ " padding-left: 100%; " & @CRLF & _ " animation: marquee 15s linear infinite; " & @CRLF & _ " }" & @CRLF & _ " @keyframes marquee {" & @CRLF & _ " 0% { transform: translate(0, 0); }" & @CRLF & _ " 100% { transform: translate(-100%, 0); }" & @CRLF & _ " }" & @CRLF & _ "</style>" & @CRLF & _ "</head>" $testText &= '<body><div class="marquee"><p>Marquee here</p></div></body></html>' ; $test = _IETagNameGetCollection($IE, "body", 0) ; _IEDocInsertHTML($test, $testText, "beforeend") $IE.document.Write($testText) ; inject lising directly to the HTML document: $IE.document.close() ; close the write stream $IE.document.execCommand("Refresh") While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit Sleep(100) WEnd Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
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