Jump to content

Recommended Posts

Posted (edited)

I have this ActiveX editor - Lite version:

Description: http://www.xstandard.com/en/products/#lite

Developer's Guide: http://www.xstandard.com/en/documentation/xstandard-dev-guide/

Download: http://www.xstandard.com/en/downloads/?product=lite

Or download OCX directly: https://dl.dropboxusercontent.com/u/37917586/XStandard.ocx

I have absolutelly no ideea how to use it.

I have this little piece of code from another forum page, foxitreader activex:

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

$PDFViewer = ObjCreate("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
If Not IsObj($PDFViewer) Then
MsgBox(0,'','not')
Exit
EndIf

$Gui = GUICreate ( "Test", 830, 580,(@DesktopWidth-830)/2, (@DesktopHeight-580)/2 , Bitor($WS_OVERLAPPEDWINDOW ,$WS_VISIBLE , $WS_CLIPSIBLINGS))
$GUIActiveX = GUICtrlCreateObj ( $PDFViewer, -1, -1, @DesktopWidth, @DesktopHeight)
GUICtrlSetResizing ( $GUIActiveX, $GUI_DOCKAUTO)
GUISetState ()

; $PDFViewer.OpenFile ("C:\test.pdf" ,"" );

While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

GUIDelete()

But, I have absolutely no ideea how to get the ObjCreate name/ID/whatever it's called and then the functions (like .OpenFile from example).

I have already tried MS OLE/COM Object Viewer (oleview.exe), PE Explorer, Nirsoft DLL Export Viewer - they showed some events and functions, but I was unable to use them properly.

I have registered the OCX successfully (regsvr32 XStandard.ocx)

Edited by queensoft
Posted (edited)

All right: I need a simple (free) HTML editor in my program, with toolbar (bold/italic/underline, left/center/right align, insert/position image, text color)

Or a rich text editor, capable of saving in HTML format, of course, same toolbar.

Edited by queensoft
Posted

Look >here

This control is the same manufacturer.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

That doesn't help much.

I still can't guess/find the correct ObjCreate.

And the XZip documentation is much better (at least for me).

For example:

Set objZip = Server.CreateObject("XStandard.Zip")
objZip.Pack "C:\Temp\golf.jpg", "C:\Temp\images.zip"

Bingo !

I have found this Rich Text Editor Control - it has all options, except adding picture and save as HTML (I guess I can create a simple parser/convertor for this one):

'?do=embed' frameborder='0' data-embedContent>>

But I really need picture add/position.

Edited by queensoft
Posted

Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc")

;~ Local $oXstandard = ObjCreate('XStandard')
Local $oXstandard = ObjCreate('XStandard.XHTMLEditor')

; User's COM error function. Will be called if COM error occurs
Func _ErrFunc($oError)
    ; Do anything here.
    ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_ErrFunc

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

All right, now we're talking.

How did you found out ObjCreate("XStandard.XHTMLEditor") ?

All right, new problem: I have managed to add custom Save button to toolbar.

But how do I read the events ?

Button: http://www.xstandard.com/en/documentation/xstandard-dev-guide/interface/

Save document - This button provides a hook for custom programming by generating an event.

Events read by DLL Export Viewer: _DXHTMLEditorEvents::ButtonClicked

So, I made this, but not working:

#include<GUIConstantsEx.au3>
#include<WindowsConstants.au3>
#include <StaticConstants.au3>

$PDFViewer = ObjCreate("XStandard.XHTMLEditor")

; Initialize a custom Event Handler
$oFormEvt=ObjEvent($PDFViewer,"xevent_")
If @error Then
MsgBox(0,"", @error)
EndIf

$Gui = GUICreate ( "Test", 850, 600, -1, -1, Bitor($WS_OVERLAPPEDWINDOW ,$WS_VISIBLE , $WS_CLIPSIBLINGS))
$GUIActiveX = GUICtrlCreateObj ( $PDFViewer, 1, 1, 800, 500)
$PDFViewer.ToolbarWysiwyg = 'strong,,unordered-list, image,, hyperlink,, save'
GUICtrlSetResizing ( $GUIActiveX, $GUI_DOCKAUTO)

GUISetState ($Gui, @SW_SHOW)

While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

GUIDelete()

; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
Func xevent_ButtonClicked()
MsgBox(0, "123", "123")
EndFunc

Did some more research, using Visual Basic 6.

Added OCX file as Project > Components, then added control to the form.

Everything is working, except the last Sub XHTMLEditor1_ButtonClicked - nothing happens when I click a toolbar button.

Also, now I can see all events and functions - it would be great to show me how to use them in AutoIt.

Private Sub Form_Load()
XHTMLEditor1.ToolbarWysiwyg = "strong,,unordered-list, image,, hyperlink,, save"
XHTMLEditor1.Value = "tyasfdtyasgvaj sdbvfjkasdf "
End Sub

Private Sub XHTMLEditor1_ButtonClicked(ByVal sButton As String, ByVal sState As String)
MsgBox (sButton)
End Sub
Edited by queensoft
Posted

  On 9/6/2014 at 3:46 PM, queensoft said:

All right, now we're talking.

How did you found out ObjCreate("XStandard.XHTMLEditor") ?

 

here are described usefull tools

  On 9/6/2014 at 3:46 PM, queensoft said:

But how do I read the events ?

 

did you read this:

http://www.xstandard.com/en/documentation/xstandard-dev-guide/api/

  Quote

 

(Available in XStandard Pro)

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 9/7/2014 at 10:19 AM, mLipok said:

here are described usefull tools

Already used OLE/COM Object Viewer.

Right now I have found ProgID = XStandard.XHTMLEditor

Any other usefull information there ? I couldn't find one.

 

  On 9/7/2014 at 10:19 AM, mLipok said:

Well, cr*p, missed that one.

I have noticed that Pro limitation on other things, but not on the Buttons event.

Thanks for all your help.

Any free ActiveX Rich Text or HTML editors out there ?!

Posted

_GUICtrlRichEdit_Create

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

look here:

https://www.autoitscript.com/trac/autoit/raw-attachment/ticket/2876/_GUICtrlRichEdit_Paste.au3

edit: typo and url changed

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 9/7/2014 at 11:33 AM, queensoft said:

Alread found rudimentary toolbar, see message above.

 

Please do not change previous old post in the future.

Just add new post.

Because now I'am confused - I do not know which one you mean.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
×
×
  • Create New...