#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #include WS_DEControl.ahk If (!WS_Initialize("VBScript")) { Msgbox % "Error initializing EasyScript" ExitApp } InitComControls() Gui, +Resize +LastFound Gui, Add, Button, x0 y0 gSetBold, Bold Gui, Add, Button, xp+40 gSetItalic,italic Gui, Add, Button, xp+50 gSetUnderLine, underline gui, Add, Button, xp+75 gSetBlue, Blue Gui, Add, Button, xp+40 gSetImageLink, Image Gui, Add, Button, xp+50 gSetHyperLink, Link Gui, Add, Button, xp+50 gLoadUrl, LoadURL Gui, Add, Button, xp+70 gGetDocument, GetHtml gui, add, button, xp+70 gSetDocument, SetHtml Gui, Add, button, xp+70 gSaveDocument, SaveHtml Gui, Add, button, xp+80 gBrowseMode, BrowseMode Toggle Gui, add, button, xp+140 gNewDocument, New Gui, Show, w800 h600 Center, DhtmlEdit_Test hWnd := WinExist() DEdit := "DEdit" ; Method #1 ppvDEdit := DE_Add(hWnd, 0, 25, 800, 575) WS_AddObject(ppvDEdit, DEdit) ; Method #2 ; If (!WS_Exec("Set %v = CreateObject(%s)", DEdit, "DhtmlEdit.DhtmlEdit")) ; Msgbox % ErrorLevel ; If (!WS_Eval(ppvDEdit, DEdit)) ; Msgbox % ErrorLevel ; ; hContainerCtrl := CreateComControlContainer(hWnd, 0, 25, 800, 575) ; AttachComControlToHWND(ppvDEdit, hContainerCtrl) Gosub, SetDocument Return ; end of auto-run SetBold: DE_SetBold(DEdit) Return SetItalic: DE_SetItalic(DEdit) Return SetBlue: DE_SetForeColor(DEdit, "0000FF") ;DE_SetForeColor(DEdit, "Blue") ; possible way ;DE_SetForeColor(DEdit, "#0000FF") ; also possible Return SetUnderline: DE_SetUnderline(DEdit) Return SetImageLink: DE_SetImage(DEdit) Return SetHyperLink: DE_SetHyperLink(DEdit) Return LoadUrl: url := "http://www.autohotkey.com" DE_LoadUrl(DEdit, url) Return NewDocument: DE_NewDocument(DEdit) Return SaveDocument: Filedir = %A_ScriptDir%\DhtmlEdit_%A_Now%.htm DE_SaveDocument(DEdit, FileDir) Return GetDocument: msgbox, % DE_GetDocumentHtml(DEdit) Return SetDocument: htmlcode = (

Forgive my poor coding style! Yes?

This File is Edited with DhtmlEdit_Demo .


This is a table
and  the right image is directly from AutoHotKey Forum.
image cannot be loaded for some reason
) DE_SetDocumentHtml(DEdit, htmlcode) htmlcode = Return BrowseMode: DE_BrowseMode(DEdit) Return GuiSize: DE_Move(ppvDEdit, 0, 25, A_GuiWidth, A_GuiHeight - 25) Return GuiClose: Gui, %A_Gui%:Destroy ReleaseObject(ppvDEdit) UninitComControls() WS_Uninitialize() ExitApp