Jump to content

How to OCX File Link?


davidkim
 Share

Recommended Posts

Before help

step 1

download this file :

http://erp.foxitsoftware.com/customer/pr...Bmb3hpdHNvZnR3YXJlLmNvbQ==

step 2

download FoxitReader_AX_Std_Eval.OCX to Drive C:\FoxitReader_AX_Std_Eval.OCX

step 3

regsvr32 c:\FoxitReader_AX_Std_Eval.OCX

step 4

make this code

Posted Image Foxit_Reader_Error.au3 (1.15K)

; Step 1
;  Download FoxitReader_AX_Std_Eval.OCX is c:\FoxitReader_AX_Std_Eval.OCX Save

; Step 2
;  regsvr32 c:\FoxitReader_AX_Std_Eval.OCX
;  Window MSGBOX [FoxitReader_AX_Std_Eval.OCX DllRegisterServer OK]

 

; Step 3 running this script
#include<GUIConstantsEx.au3>
#include<WindowsConstants.au3>
 $PDFViewer = ObjCreate("Foxit.FoxitReaderSDKCtrl.3")
 If Not IsObj($PDFViewer) Then
    MsgBox(0,'','not')
    Exit
 EndIf


$Gui = GUICreate ( "Foxit PDF Reader", 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 ()

 

; Step 4 Error
  $PDFViewer.OpenFile   ("C:\test.pdf" ,"" );
; <======= error
; ErrorMsg is
; Line29 (File "C:\Foxit_Reader_Error.au3");
; $PDFViewer.OpenFile   ("C:\test.pdf");
; $PDFViewer.OpenFile   ("C:\test.pdf")^ERROR
; Error: The requested action with this object has failed.

While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

GUIDelete()

FoxitActiveX30_guide.pdf....

///////////////////////////////////////////////////////////////////////////

Tutorials

The Foxit Reader SDK ActiveX control comes with a single OCX file. To install it, please use command "regsvr32 foxitreader_ax.ocx". You may need to specify the proper path if foxitreader_ax.ocx is not stored in current directory.

The ActiveX control handles user interface for you. It also supplies multiple properties and methods so that your application is able to control the ActiveX.

The following is a example, suppose we had already created an ActiveX control called FoxitReaderSDK.

1) Open a PDF File

We will open a PDF document named “testdoc.pdf”

// NOTE: If you are evaluating ActiveX, you don’t need to unlock it,

// then evaluation marks will be shown on all PDF pages.

// For paid customers, please unlock the ActiveX first.

FoxitReaderSDK.UnLockActiveX(“license_id”,”unlock_code”);

FoxitReaderSDK.OpenFile(“testdoc.pdf”,””); Posted Image

//////////////////////////////////////////////////////////////////////////////////////////////

step 5

run this script file

step 6

error msg: Error: The requested action with this object has failed.

step 7

help me....

Edited by davidkim

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

Currently it records the (Reply) by mistake and it stands and to Delete the Reply elimination which wants does not become. It eliminates the (Reply) how. It informs and it requestsPosted Image Edited by davidkim

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

Use this:

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

instead of this:

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

Also add error handler to see detailed error description as was said.

Just add this at begin of your script:

$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")    

Func MyErrFunc()
  Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !"      & @CRLF  & @CRLF & _
             "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _
             "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _
             "err.number is: "         & @TAB & hex($oMyError.number,8)  & @CRLF & _
             "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _
             "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _
             "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _
             "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _
             "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _
            )
Endfunc
Link to comment
Share on other sites

Use this:

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

instead of this:

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

Also add error handler to see detailed error description as was said.

Just add this at begin of your script:

$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")    

Func MyErrFunc()
  Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !"      & @CRLF  & @CRLF & _
             "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _
             "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _
             "err.number is: "         & @TAB & hex($oMyError.number,8)  & @CRLF & _
             "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _
             "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _
             "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _
             "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _
             "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _
            )
Endfunc

Thank's Zedna

$PDFViewer = ObjCreate("Foxit.FoxitReaderSDKCtrl.3")

Func MyErrFunc()
  Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !"      & @CRLF  & @CRLF & _
             "err.description is: "    & @TAB & $oMyError.description    & @CRLF & _
             "err.windescription:"     & @TAB & $oMyError.windescription & @CRLF & _
             "err.number is: "         & @TAB & hex($oMyError.number,8)  & @CRLF & _
             "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _
             "err.scriptline is: "     & @TAB & $oMyError.scriptline     & @CRLF & _
             "err.source is: "         & @TAB & $oMyError.source         & @CRLF & _
             "err.helpfile is: "       & @TAB & $oMyError.helpfile       & @CRLF & _
             "err.helpcontext is: "    & @TAB & $oMyError.helpcontext _
            )
Endfunc

This code insert ....... Error msg:

Posted Image

error msg : It is an error which is fatal

this code insert...... error msg:

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

Posted Image

FoxitReader_AX_Std_Eval.OCX was Menual

-----------------------------------------------------------

Tutorials

The Foxit Reader SDK ActiveX control comes with a single OCX file. To install it, please use command "regsvr32 foxitreader_ax.ocx". You may need to specify the proper path if foxitreader_ax.ocx is not stored in current directory.

The ActiveX control handles user interface for you. It also supplies multiple properties and methods so that your application is able to control the ActiveX.

The following is a example, suppose we had already created an ActiveX control called FoxitReaderSDK.

1) Open a PDF File

We will open a PDF document named “testdoc.pdf”

// NOTE: If you are evaluating ActiveX, you don’t need to unlock it,

// then evaluation marks will be shown on all PDF pages.

// For paid customers, please unlock the ActiveX first.

FoxitReaderSDK.UnLockActiveX(“license_id”,”unlock_code”);

FoxitReaderSDK.OpenFile(“testdoc.pdf”,””);

---------------------------------------------------------------------------------

Edited by davidkim

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...