slayerz Posted April 30, 2010 Share Posted April 30, 2010 no, but why you want use javascript ?Maybe for more animation ? hehe AUTOIT[sup] I'm lovin' it![/sup] Link to comment Share on other sites More sharing options...
JRowe Posted April 30, 2010 Share Posted April 30, 2010 (edited) We can use this to create arbitrarily complex GUI structures very easily. Parameters of each and any structure can be modified by changing the css during runtime. Normally, javascript does that in browsers. You could use javascript (either find a dll version of a js engine, or use plugins to wrap one,) but using autoit will be faster, more efficient, and more reliable when using this UDF. I actually really like this - check out my Transitions & Tweening UDF. You can use that on any css parameter to get special effects - size, color, position, transparency. This gives us the foundation for some really slick GUI widgets. (That is, if you want to control from AutoIt , CSS! script is the direct interface.) 5 stars! Edited April 30, 2010 by JRowe [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
Splash Posted April 30, 2010 Share Posted April 30, 2010 (edited) Input masks. ^^ For now I am using this: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("Embedded Internet Explorer", 800, 600, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 800, 600) GUISetState() ;Show GUI _IENavigate ($oIE, "about:blank") ;necessary. i don't know why. $sHTML = "" $sHTML &= "<html>" & @CR $sHTML &= "<head>" & @CR $sHTML &= "<script>" & @CR $sHTML &= "window.onload = function () { alert(document.title) }" & @CR $sHTML &= "</script>" & @CR $sHTML &= "<title>Teste</title>" & @CR $sHTML &= "</head>" & @CR $sHTML &= "<body>" & @CR $sHTML &= "</body>" & @CR $sHTML &= "Olá mundo!" & @CR $sHTML &= "</html>" _IEDocWriteHTML ($oIE, $sHTML) ;_IEAction ($oIE, "refresh") ;some times necessary ex.: write a frameset ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() Exit Edited April 30, 2010 by Splash Automatic Update UDF - IP Address UDF - WinPcap AutoIt _FindDevice()[font="Verdana"][size="2"]AutoIt Spanish/Brasil/World community!!![/size][/font]Use you wanna a dot.tk domain please use my link: Link to comment Share on other sites More sharing options...
JRowe Posted April 30, 2010 Share Posted April 30, 2010 How do we enable interacting with text? I can't highlight or select anything, and no keyboard input works. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
GMib Posted April 30, 2010 Author Share Posted April 30, 2010 Input masks. ^^Sorry i don't understand what you wantHow do we enable interacting with text? I can't highlight or select anything, and no keyboard input works.you can use accesskeys behavior for give focus, see html_samples\behaviors\accesskeys.htm in sdk.you can also use csss, see html_samples\csss!\keyboard-handling.htm.for receiving key event try _HLWindowAttachEventHandler($HLHwnd, "_events", $HANDLE_KEY )i actualy work on sciter udf (sciter is htmlayout + tiscript), sciter is up to date and correct some bug i have with opacity background.when i finish i will make an transparent osd menu exemple. Link to comment Share on other sites More sharing options...
slayerz Posted April 30, 2010 Share Posted April 30, 2010 Great!! This will definitely give more ways to design a GUI + animation Keep up the good work buddy AUTOIT[sup] I'm lovin' it![/sup] Link to comment Share on other sites More sharing options...
GMib Posted April 30, 2010 Author Share Posted April 30, 2010 How do we enable interacting with text? I can't highlight or select anything, and no keyboard input works.i actualy work on sciter udf (sciter is htmlayout + tiscript), sciter is up to date and correct some bug i have with opacity background.when i finish i will make an transparent osd menu exemple.Sciter UDF is out, try osd menu exemple. Link to comment Share on other sites More sharing options...
oneLess Posted September 1, 2010 Share Posted September 1, 2010 i have an application , is Bitdefender 2011 setup , who use HtmLayout.dllsome more info here http://www.autoitscript.com/forum/index.php?showtopic=119053Au3Info.exe cant give other infos than Title and Class for main window , and nothing from controls.can i use HtmLayout DLL UDF or Sciter Dll UDFfor managing a silent install for this installer ?i am interesting in something simple likewinwait , controlclick , controlsend ...can i grab infos about controls, windows ?if yes , which one is recommended for start ? Link to comment Share on other sites More sharing options...
RedBust Posted June 3, 2011 Share Posted June 3, 2011 (edited) Does'nt works with the last DLL version. Nobody can upgrade the UDF ? I have systematically the error : Return $result[0] Return $result^ ERROR So DllCall in HLStartup returns nothing. I don't find the new parameters used to call HTMLayout DLL, so I can't upgrade the UDF. Is it an UDF problem ? Please help me, thanks. Edited June 3, 2011 by RedBust Link to comment Share on other sites More sharing options...
RedBust Posted June 3, 2011 Share Posted June 3, 2011 (edited) (sorry error), please delete message Edited June 3, 2011 by RedBust Link to comment Share on other sites More sharing options...
PHPer Posted August 8, 2011 Share Posted August 8, 2011 "tabs" ErrorCannot be displayed Link to comment Share on other sites More sharing options...
matwachich Posted November 14, 2011 Share Posted November 14, 2011 (edited) Very nice! But i just want to know something: How is it possible to scroll down the HTMLayout control??? Like this with IE: $oIE.document.body.scrollTop = Number($oIE.document.body.scrollHeight) Another question: In a HTMLayout Control, how could I select and Copy some text, if for example i want to past it elsewhere????? Thanks! Edited November 14, 2011 by matwachich Link to comment Share on other sites More sharing options...
nullschritt Posted September 5, 2012 Share Posted September 5, 2012 I was just wondering, because I did not see any functions in the list to do it. Is there a way to scroll the control all the way to the bottom? Like how with the internet explorer object you can tell it to scroll down it's full height, for an html formatted chat window. Thanks Link to comment Share on other sites More sharing options...
davidkim Posted September 6, 2012 Share Posted September 6, 2012 layout.htm in text is only english? not support unicode? edit layout.htm in <div .playground> <caption>캡션 1</caption> <div .expandable> 첫번째 패널 output ???? 1 ?????? ???? there output I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks. Link to comment Share on other sites More sharing options...
ProgAndy Posted September 6, 2012 Share Posted September 6, 2012 Is there a way to scroll the control all the way to the bottom? Like how with the internet explorer object you can tell it to scroll down it's full height, for an html formatted chat window.I would create an element with an ID at the end of the page and the scroll to this id. I know that's possible but I forgot the commands to do so.@davidkim: Did you save that file as utf and added the charset to the headers or something like that? *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
nullschritt Posted September 6, 2012 Share Posted September 6, 2012 I would create an element with an ID at the end of the page and the scroll to this id. I know that's possible but I forgot the commands to do so.@davidkim: Did you save that file as utf and added the charset to the headers or something like that?Yes, I could make each message have an ID, and scroll to the bottommost id, but without the command to scroll idk how to do the scrolling o.oHopefully someone else knows. Link to comment Share on other sites More sharing options...
ProgAndy Posted September 6, 2012 Share Posted September 6, 2012 (edited) I searched in my scripts and found this. It won't work well if the last message is wider than the window, though. Func _HTMLayout_ScrollToEnd($he) ; Author: ProgAndy ; scrolls the end of the given html element into view. Local $cnt = _HTMLayoutGetChildrenCount($he) If $fScrollDown And $cnt Then Local $c = _HTMLayoutGetNthChild($he, $cnt - 1) _HTMLayoutScrollToView($c, 0x11) _HTMLayout_UnuseElement($c) EndIf EndFunc ;==>_HTMLayout_ScrollToEnd ; Example: Local $root = _HTMLayoutGetRootElement($hHTMLLayout) Local $body = _HTMLayoutGetNthChild($root, 1) _HTMLayout_UnuseElement($root) _HTMLayoutSetElementHtml($body, BinaryToString(StringToBinary($sEntry, 4), 1), -1, $SIH_APPEND_AFTER_LAST) ; append utf-8 encoded string _HTMLayout_ScrollToEnd($body) _HTMLayout_UnuseElement($body) Edited September 6, 2012 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
nullschritt Posted September 6, 2012 Share Posted September 6, 2012 (edited) I searched in my scripts and found this. It won't work well if the last message is wider than the window, though. Func _HTMLayout_ScrollToEnd($he) ; Author: ProgAndy ; scrolls the end of the given html element into view. Local $cnt = _HTMLayoutGetChildrenCount($he) If $fScrollDown And $cnt Then Local $c = _HTMLayoutGetNthChild($he, $cnt - 1) _HTMLayoutScrollToView($c, 0x11) _HTMLayout_UnuseElement($c) EndIf EndFunc ;==>_HTMLayout_ScrollToEnd ; Example: Local $root = _HTMLayoutGetRootElement($hHTMLLayout) Local $body = _HTMLayoutGetNthChild($root, 1) _HTMLayout_UnuseElement($root) _HTMLayoutSetElementHtml($body, BinaryToString(StringToBinary($sEntry, 4), 1), -1, $SIH_APPEND_AFTER_LAST) ; append utf-8 encoded string _HTMLayout_ScrollToEnd($body) _HTMLayout_UnuseElement($body) Oh, wow, thanks! (and yeah I will just use 100% divs, I want the text to wrap anyways. Edit: After a look over your code (still haven't tested yet), does this code automatically scroll to the end of the entire control? or, do I need to provide an ID? Sorry I am a little confused by it, I don't see anywhere that an element is defined, I only see a variable called $body I am mostly confused by this line, _HTMLayoutSetElementHtml($body, BinaryToString(StringToBinary($sEntry, 4), 1), -1, $SIH_APPEND_AFTER_LAST), what exactly is controling? (I guess what is the variable $body referring to?) Edited September 6, 2012 by nullschritt Link to comment Share on other sites More sharing options...
siqian Posted April 19, 2013 Share Posted April 19, 2013 That's really terrific!But is there an example for that?I tried while failed to run my file with "htmlayout".Could you please help give me one?Grate thanks ~ Link to comment Share on other sites More sharing options...
zazapeta Posted July 25, 2013 Share Posted July 25, 2013 Hi, i have detect a mistake in this UDF. Func _HLSetElementState $result = DllCall($HtmLayoutdll, "int", "HTMLayoutGetElementState", "ptr", $el, "UINT", $stateToSet, "UINT", $stateToClear, "BOOL", $upt) should be : Func _HLSetElementState $result = DllCall($HtmLayoutdll, "int", "HTMLayoutSetElementState", "ptr", $el, "UINT", $stateToSet, "UINT", $stateToClear, "BOOL", $upt) HTMLayoutGetElementState ----> HTMLayoutSetElementState regards. 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