CZamirekko Posted November 26, 2023 Share Posted November 26, 2023 I have this code to display the contents of a PDF file in a GUI object. The code is only functional if the included 3rd line is not commented out. Can you advise to correct the code so that MsgBox does not run? Thank you Func ShowDialog() ; PDF object MsgBox(16, $App_name & " " & $App_version, "random text") $objectPDF = ObjCreate("AcroPDF.PDF.1") $objectPDF.src = $INI_inputfolder &"\"& $pdflist[1] $objectPDF.setShowToolbar(0) $objectPDF.setShowScrollbars(0) $objectPDF.setView('FitH') $objectPDF.setLayoutMode('SinglePage') $objectPDF.setPageMode('None') ; PDF object in GUI $dialog = GUICreate("load EAN", 1280, 820, -1, -1, -1,$WS_EX_TOPMOST) GUICtrlCreateObj($objectPDF, 5, 5, 1270, 720) $Dinput = GUICtrlCreateEdit("", 5, 740, 350, 42, BitOR($ES_WANTRETURN, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL)) GUICtrlSetTip(-1, "load ean") GUICtrlSetFont(-1, 22, 400, 0, "Arial") $stat = _GUICtrlStatusBar_Create($dialog) Dim $StatusBar1_PartsWidth[1] = [-1] _GUICtrlStatusBar_SetParts($stat, $StatusBar1_PartsWidth) _GUICtrlStatusBar_SetText($stat, $App_name & " verze " & $App_version & " ( vers. " & $App_lastupd & ")", 0) GUISetState(@SW_SHOW, $dialog) GUICtrlSetState($Dinput,$GUI_FOCUS) While 1 $Read = GUICtrlRead($Dinput) If StringRight($Read,2) = @CRLF Then GUIDelete($dialog) Return StringReplace($Read,@CRLF,"") ExitLoop EndIf WEnd EndFunc Link to comment Share on other sites More sharing options...
CZamirekko Posted November 26, 2023 Author Share Posted November 26, 2023 And one more problem, the code leaves me with a lot of "Adobe Acrobat" processes in the background. Each time the code is run, another new "Adobe Acrobat" process will appear. Thank you for your help. Link to comment Share on other sites More sharing options...
Andreik Posted November 26, 2023 Share Posted November 26, 2023 What about posting some code that can reproduce the issue? Should we guess what some of the variables values are? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
CZamirekko Posted November 26, 2023 Author Share Posted November 26, 2023 I solved one problem, the PDF file content listing is now functional. x64 =y must not be set at the beginning of the file, when I changed it to x64 =n the PDF content appeared. With this declaration, the code works: #AutoIt3Wrapper_UseX64=n argumentum 1 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