RedBust Posted June 2, 2011 Share Posted June 2, 2011 Hi all.I have a problem using the COM Object HTMLayout with witch I can execute HTM code in a GUI.I succeed to register the DLL AxHTMLayout for use the object AxHTMLayout.Engine.1.I use Windows 7, so I used the command :\windows\syswow64\regsvr32 C:\..\AxHTMLayout.dllRegSVR32 return the success message.So I use for the first try :expandcollapse popup#include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Const $BE_BUTTON_CLICK = 0 Const $BE_BUTTON_PRESS = 1 Const $BE_BUTTON_STATE_CHANGED = 2 Const $BE_EDIT_VALUE_CHANGING = 3 Const $BE_EDIT_VALUE_CHANGED = 4 Const $BE_SELECT_SELECTION_CHANGED = 5 Const $BE_SELECT_STATE_CHANGED = 6 Const $BE_POPUP_REQUEST = 7 Const $BE_POPUP_READY = 8 Const $BE_POPUP_DISMISSED = 9 Const $BE_MENU_ITEM_ACTIVE = 10 Const $BE_MENU_ITEM_CLICK = 11 Const $BE_CONTEXT_MENU_SETUP = 15 Const $BE_CONTEXT_MENU_REQUEST = 16 Const $BE_VISIUAL_STATUS_CHANGED = 17 Const $BE_HYPERLINK_CLICK = 128 Const $BE_TABLE_HEADER_CLICK = $BE_HYPERLINK_CLICK + 1 ;129 Const $BE_TABLE_ROW_CLICK = $BE_TABLE_HEADER_CLICK + 1 ;130 Const $BE_TABLE_ROW_DBL_CLICK = $BE_TABLE_ROW_CLICK + 1 ;131 Const $BE_ELEMENT_COLLAPSED = 144 Const $BE_ELEMENT_EXPANDED = $BE_ELEMENT_COLLAPSED + 1 ;145 Const $BE_ACTIVATE_CHILD = $BE_ELEMENT_EXPANDED + 1 ;146 Const $BE_DO_SWITCH_TAB = $BE_ACTIVATE_CHILD ;146 Const $BE_INIT_DATA_VIEW = $BE_DO_SWITCH_TAB + 1 ;147 Const $BE_ROWS_DATA_REQUEST = $BE_INIT_DATA_VIEW + 1 ;148 Const $BE_UI_STATE_CHANGED = $BE_ROWS_DATA_REQUEST + 1 ;149 Const $BE_FORM_SUBMIT = $BE_UI_STATE_CHANGED + 1 ;150 Const $BE_FORM_RESET = $BE_FORM_SUBMIT + 1 ;151 Const $BE_DOCUMENT_COMPLETE = $BE_FORM_RESET + 1 ;152 Const $BE_HISTORY_PUSH = $BE_DOCUMENT_COMPLETE + 1 ;153 Const $BE_HISTORY_DROP = $BE_HISTORY_PUSH + 1 ;154 Const $BE_HISTORY_PRIOR = $BE_HISTORY_DROP + 1 ;155 Const $BE_HISTORY_NEXT = $BE_HISTORY_PRIOR + 1 ;156 Const $BE_HISTORY_STATE_CHANGED = $BE_HISTORY_NEXT + 1 ;157 Const $BE_FIRST_APPLICATION_EVENT_CODE = 256 $Form1 = GUICreate("Form1", 800, 550, 10, 50, $WS_POPUP, $WS_EX_LAYERED) $size = WinGetClientSize($Form1) GUISetBkColor(0xABCDEF) $Obj1 = ObjCreate("AxHTMLayout.Engine.1") $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, $size[0], $size[1]) $Oevent = ObjEvent($Obj1, "event_") _WinAPI_SetLayeredWindowAttributes($Form1, 0xABCDEF, 250) GUISetState(@SW_SHOW) $Obj1.Load('file://' & @ScriptDir & '\sliding-list.htm') While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_SECONDARYUP Exit EndSwitch WEnd Func event_onControlEvent($element, $eventtype, $reason, $handled) ConsoleWrite($eventtype & @CRLF) If $eventtype = $BE_HYPERLINK_CLICK Then If $element.attribute("id") = "CloseGui" Then Exit EndIf If $eventtype = $BE_BUTTON_CLICK Then If $element.attribute("id") = "buttonclick" Then MsgBox("", "Button Test", "Button Click Event") EndIf If $eventtype = $BE_ELEMENT_COLLAPSED Then ConsoleWrite('Collapsed: ' & $element.attribute("id") & @CRLF) EndIf If $eventtype = $BE_ELEMENT_EXPANDED Then ConsoleWrite('Expanded: ' & $element.attribute("id") & @CRLF) EndIf EndFunc ;==>event_onControlEvent Func event_DocumentLoaded() $O2event = ObjEvent($Obj1.root, "event_", "_IElementEvents") EndFunc ;==>event_DocumentLoadedAnd i have the error for an inexistant COM object.I try IsObj with $Obj1 var, and it tells me that the object is inexistant.I do not find the name of OLE object corresponding to the DLL AxHTMLayout, because I'm sure that the DLL installation succeed.Thank you (and sorry for English error, I'm French.). Link to comment Share on other sites More sharing options...
RedBust Posted June 3, 2011 Author Share Posted June 3, 2011 Nobody can help me ? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted June 4, 2011 Share Posted June 4, 2011 I see that you are on a x64 OS, presumably you are using a x86 dll, so are you running x86 AutoIt?Set:#AutoIt3Wrapper_UseX64=nAnd don't forget to install SciTE4AutoIt3 if you haven't already. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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