Jump to content
Sign in to follow this  
motionman95

Render tags in textbox

Recommended Posts

motionman95

Is it possible to render certain HTML tags in an AutoIt text feild?

I only would need to render links (a tags) and maybe images (img tag).

Thanks in advance!


Share this post


Link to post
Share on other sites
ProgAndy

You can write some code to include HTMLLayout :)

http://terrainformatica.com/htmlayout/main.whtm

or use IE

Edited 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

Share this post


Link to post
Share on other sites
motionman95

Wow, Mr.CreatoR's work is amazing! I'll take a look!


Share this post


Link to post
Share on other sites
spudw2k

Here's another, crude example.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 193, 115)
$Obj1 = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($Obj1, 64, 40, 498, 140)
$Input1 = GUICtrlCreateInput("Input1", 176, 240, 265, 21)
$Button1 = GUICtrlCreateButton("Button1", 256, 288, 105, 17, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $Obj1.navigate("about:<h1><center>" & GUICtrlRead($Input1) & "</h1></center>")

    EndSwitch
WEnd

Share this post


Link to post
Share on other sites
motionman95

Spudw2k, does you example log history, cookies, etc. in IE?


Share this post


Link to post
Share on other sites
spudw2k

Spudw2k, does you example log history, cookies, etc. in IE?

I guess that depends on what you use it for. If you're going to be browsing the web with the object I'm sure it will cache it normally.

Turns out you can do some kinda nifty stuff, including some javascript. Here's an updated example.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 193, 115)
$Obj1 = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($Obj1, 64, 40, 498, 140)
$Input1 = GUICtrlCreateInput("Input1", 176, 240, 265, 51, 0x1044)
    GUICtrlSetData(-1,'<a href="javascript:document.write(' & "'Heres some text <br>'" & ')">Click Me</a>')
$Button1 = GUICtrlCreateButton("Button1", 256, 298, 105, 17, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $Obj1.navigate("about:<HTML>" & GUICtrlRead($Input1) & "</HTML>")

    EndSwitch
WEnd
Edited by spudw2k

Share this post


Link to post
Share on other sites
ProgAndy

hi, can you give me an example who use HTMLLayout for embed html ?

i wan't use html for display movie info in a gui, i don't understand how use this dll.

Sorry for my bad english.

Sorry, I have currently no time, but you can look at the PowerBasic-Wrappers. I think, you should be able to convert them to AutoIt

*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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.