Products Resources Support About Us

Rocket Software

Wintegrate script error on Dialog Box

I am trying to run a script in Wintegrate to bring an ActiveX control to a Dialog Box and view an image, but receiving the “Error Running Script Command” window with the error message “6162 DialogBox: Unable to create this dialog to show”.

I am using Wintegrate 6.4.3 with SSH communication. Below is the script DocViewer.wis. The error pops up when it is executing the line “DialogBox Window DocumentViewer”.

If IsDialog(DocumentViewer) Then Db Delete DocumentViewer

viewFileMethodCall = “DocumentViewer.DocViewer.ViewFile ‘uid’, ‘load image’, ‘C:\DocViewer\image1.tif’”

viewSingleDocMethodCall = “DocumentViewer.DocViewer.ViewDocument ‘image1.tif’, ‘BL_img’, 4”

DialogBox Create DocumentViewer 0,0,655,500
Caption “Document Viewer”
Font 8,“Helv”

AxControl DocViewer,“DocViewerControl”,5,24,645,470

PushButton “&Debug Mode”,DebugMode,20,5,50,14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PushButton “&View File”,ViewFile,75,5,50,14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PushButton “View &Single Document”,ViewSingleDocument,130,5,85,14, WS_CHILD | WS_VISIBLE | WS_TABSTOP

ControlCommand DebugMode, “DocumentViewer.DocViewer.DebugMode = true”
ControlCommand ViewFile, viewFileMethodCall
ControlCommand ViewSingleDocument, viewSingleDocMethodCall

OnEvent DocViewer, 1, “pageNo = DocumentViewer.DocViewer.CurrentDocumentPageIndex + 1; DialogBox Caption DocumentViewer, DocumentViewer.DocViewer.CurrentDocumentTitle:’ (page ‘:pageNo:’ of ‘:DocumentViewer.DocViewer.CurrentDocumentPageCount:’)’”


DialogBox Window DocumentViewer


Any help is much appreciated.

Best regards,