
drbyte
Active Members-
Posts
44 -
Joined
-
Last visited
Recent Profile Visitors
181 profile views
drbyte's Achievements

Seeker (1/7)
2
Reputation
-
Hello Jos, It also works on my pc at work (W10-X64) Thnx !!๐
-
Jos reacted to a post in a topic: Error: Couldn't open input file
-
Jos, I did a quick check on mij home computer (W7-x64, with also the same error), and used the beta version Autoit3Wrapper.au3 No errors, it worked perfect! Next week (Tuesday) i'm going to check the beta version on my pc at work, where i did the testing today. I let you know! Thnx a lot !!
-
Thank you Jos, I will wait for your answer/solution๐
-
Sorry Jos........ ๐ test3.au3
-
Below the source code. #region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00020409) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00020409' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00020409->' & $aResult[1] & ')') EndIf EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() #endregion --- Internal functions Au3Recorder End --- _WinWaitActivate("Program Manager","") MouseClick("left",371,1058,1) _WinWaitActivate("Map1 - Excel","") MouseClick("left",196,327,1) Send("123{ENTER}") Sleep (500) Send("456{ENTER}") Sleep (500) Send("={UP}{+}") Sleep(750) Send("{UP}{UP}{ENTER}") #endregion --- Au3Recorder generated code End ---
-
Hello all, I started again after a long time to use Autoit, installed version autoit-v3.3.14.5. When i press Build, i get the error below. How can i solve this? Running on Windows 10-64 bit. >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /Prod /AU3check /in "C:\AutoIt\test3.au3" +>11:40:24 Starting AutoIt3Wrapper (21.316.1639.1) from:SciTE.exe (4.4.6.0) Keyboard:00020409 OS:WIN_10/2009 CPU:X64 OS:X64 Environment(Language:0413) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\username\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\username\AppData\Local\AutoIt v3\SciTE !Main script C:\AutoIt\test3.au3 contains Unicode characters so copy for processing to C:\Temp\AutoIt3WrapperRunTmpFiles\test3.au3 !$ScriptFileName = C:\AutoIt\test3.au3 $nScriptFileName = C:\Temp\AutoIt3WrapperRunTmpFiles\test3.au3 >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:C:\AutoIt\test3.au3 Error : couldn't open input file: !>11:40:24 AU3Check ended. Press F4 to jump to next error.rc:3 +>11:40:24 AutoIt3Wrapper Finished. >Exit code: 0 Time: 0.7446
-
I took a quick look, but at this moment i can't spend much time on it. (deadline on some other projects....) I will change the QuickPDF_Examples.au3 to open other pdf file's.
-
@Jos i run indeed an older version of AutoIt3, version 3.3.0. I wil upgrade to the latest version, and see if this helps.
-
I added the QuickPDF.au3 to the include directory and i ran the QuickPDF_Examples.au3. At that moment i get a lot of errors of missing several .au3 files. i run SciTE Version 3.3.0 Mar 30 2013 17:50:01 Below the error log >"I:\Data\Autoit\SciTe\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "I:\Data\Autoit private\zz_projects\QuickPDF_Examples.au3" /UserParams +>18:53:45 Starting AutoIt3Wrapper v.2.1.2.9 Environment(Language:0409 Keyboard:00020409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.22.0) from:I:\Data\Autoit I:\Data\Autoit private\1_include\QuickPDF.au3(7,10) : ERROR: can't open include file <MsgBoxConstants.au3>. #include <MsgBoxConstants.au3> ~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(10,10) : ERROR: can't open include file <WinAPIFiles.au3>. #include <WinAPIFiles.au3> ~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(350,26) : WARNING: $MB_SYSTEMMODAL: possibly used before declaration. MsgBox($MB_SYSTEMMODAL, ~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(607,101) : ERROR: syntax error Func _QPDF_FileSplitEachPage($sPDF_FileFullPath, $sPDF_Password = '', $sDestinationDir = @ScriptDir & ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(607,138) : ERROR: _QPDF_FileSplitEachPage() called by a previous line with 3 arg(s). Max = 0. First previous line calling this Func is 426. Func _QPDF_FileSplitEachPage($sPDF_FileFullPath, $sPDF_Password = '', $sDestinationDir = @ScriptDir & '\Extracted', $iNumberOfDigits = 3) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(619,106) : ERROR: syntax error $sPDF_Destination = $sDestinationDir & '\' & StringRegExp($sPDF_FileFullPath, '(?i).*\\(.*?)\.pdf', 3)[ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(619,170) : WARNING: $iNumberOfDigits: possibly used before declaration. $sPDF_Destination = $sDestinationDir & '\' & StringRegExp($sPDF_FileFullPath, '(?i).*\\(.*?)\.pdf', 3)[0] & '_p' & __QPDF_AddLeadingZeros(String($n), $iNumberOfDigits) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(774,36) : WARNING: $MB_OK: possibly used before declaration. MsgBox($MB_SYSTEMMODAL + $MB_OK, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(350,26) : ERROR: $MB_SYSTEMMODAL: undeclared global variable. MsgBox($MB_SYSTEMMODAL, ~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(619,170) : ERROR: $iNumberOfDigits: undeclared global variable. $sPDF_Destination = $sDestinationDir & '\' & StringRegExp($sPDF_FileFullPath, '(?i).*\\(.*?)\.pdf', 3)[0] & '_p' & __QPDF_AddLeadingZeros(String($n), $iNumberOfDigits) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(774,36) : ERROR: $MB_OK: undeclared global variable. MsgBox($MB_SYSTEMMODAL + $MB_OK, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\1_include\QuickPDF.au3(423,46) : ERROR: _WinAPI_FileInUse(): undefined function. While _WinAPI_FileInUse($sA5_UpperAndBottom) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I:\Data\Autoit private\zz_projects\QuickPDF_Examples.au3 - 9 error(s), 3 warning(s) !>18:53:45 AU3Check ended. Press F4 to jump to next error.rc:2 >Exit code: 2 Time: 0.354
-
@mLipok, Excuses for the late reply..... I added the QuickPDF.au3 to the include directory and i ran the QuickPDF_Examples.au3. At that moment i get a lot of errors of missing several .au3 files.
-
Hello all, I have to print a lot pdf labels during a day at work. One of our customers delivers them as a pdf file on a single A4 page. Every time when i need to print a specific label, i need to do the handling below to print the selected label to our Dymo printer. Can this be automated in a simple way? 1. Zoom opened pdf to 350% 2. Resize the window to fit the label 3. Select print 4. Choose printer 5. Select properties 6. Select left roll 7. Select the correct label size 8. Select current view 9. Press print...... If found the code below in the forum, is this, with some adjustments of course usable? (Thanks to M23) #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; Install a custom error handler Global $oMyError = ObjEvent("AutoIt.Error","_ComErrFunc") Global $iGUIWidth = 800, $iGUIHeight = 570, $fResized = False _Show_PDF() Func _Show_PDF() ; Get file to display Local $sFile = FileOpenDialog("Choose PDF", "C:\Temp", "PDF Files(*.pdf)", 3) ; put your own start folder here If @error Then MsgBox(0, "Error", "No file selected") Return EndIf ; Declare objects Local $oPDF = ObjCreate("AcroPDF.PDF.1"); $oPDF.src = $sFile ; Create GUI GUICreate("Label Printer", 1580, 590, -1, -1, BitOr($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_MAXIMIZEBOX)) Local $GUI_ActiveX = GUICtrlCreateObj($oPDF, 10, 10, 1560, 570) GUICtrlSetStyle($GUI_ActiveX, $WS_VISIBLE) GUICtrlSetResizing($GUI_ActiveX, $GUI_DOCKAUTO) ; Auto Resize Object GUISetState() ; When window is resized, run this function GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch If $fResized = True Then ConsoleWrite($iGUIWidth & " - " & $iGUIHeight & @CRLF) $fResized = False WinMove($GUI_ActiveX, "", Default, Default, $iGUIWidth - 20, $iGUIHeight - 20) EndIf WEnd ; Clear up $oPDF = "" $GUIActiveX = "" Exit EndFunc Func MY_WM_SIZE($hWnd, $Msg, $wParam, $lParam) $iGUIWidth = BitAND($lParam, 0xFFFF) $iGUIHeight = BitShift($lParam, 16) $fResized = True Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_SIZE Func _ComErrFunc() Local $HexNumber = Hex($oMyError.number,8) 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 & $HexNumber & @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 _ ) SetError(1) EndFunc
-
Match values in Array with values in Excel
drbyte replied to drbyte's topic in AutoIt General Help and Support
@JCEF I'am also testing your code at the moment. Wat does "$oExcel.Sheets("Folha1")" mean is this the name of the sheet name? Did some experimenting it is indeed the name of the worksheet. There is a small mistake in your code, corrected code below. For $1 = 0 To UBound($aFiles) - 1 Is has to be from 0 to Ubound, otherwise i will miss the first record of the array. -
drbyte reacted to a post in a topic: Match values in Array with values in Excel
-
Match values in Array with values in Excel
drbyte replied to drbyte's topic in AutoIt General Help and Support
@soonyee91 Perfect solution! I'am learning more and more on how to handle this. Thnx a lot. -
drbyte reacted to a post in a topic: Match values in Array with values in Excel
-
I fill an array with values from pdf file's found in a directory. Now i need to find de corrsponding values in the array and in the excel sheet, and place "X" in the cell at the left of the corresponding value. How to do this? See below the code i made so far to fill the 2D array with the value's (a lot of code plagarized from Kylomas and soonyee91 ) ; ------------------------------------------------------------------------------------ ; create pdf files in @scriptdir \test\ for testing ; ------------------------------------------------------------------------------------ Local $result[16] $result[0] = "Could be any name - ABCD001.pdf" $result[1] = "Could be any name - ABCD003.pdf" $result[2] = "Could be any name - ABCD005.pdf" $result[3] = "Could be any name - ABCD007.pdf" $result[4] = "Could be any name - ABCD009.pdf" $result[5] = "material-1a_124567.pdf" $result[6] = "material-1b_12345_589752467.pdf" $result[7] = "material-1c_12345_nesting.pdf" $result[8] = "material-1d_us_04030-2010-09-03.pdf" $result[9] = "material-1e_us_Certificaat.pdf" $result[10] = "material-1f_z35_SL1020_01.pdf" $result[11] = "material-1g_harden_W1305050.pdf" $result[12] = "material-1h_veredelen_SL1025_02.pdf" $result[13] = "material-1k_painting.pdf" $result[14] = "material-1i_ndt_RM0199.pdf" $result[15] = "material-1j_ndt_Certificaat.pdf" For $1 = 0 To UBound($result) - 1 FileOpen(@ScriptDir & '\test\' & $result[$1], 16) Next ; end creation pdf file's ; list all .pdf type files from a specific directory $atemp_Files = _FileListToArray(@ScriptDir & '\test\', '*.pdf', 1) _ArrayDisplay($atemp_Files, "Directory loaded") ; Remove all file names with "material-" in the pdf file For $i = UBound($atemp_Files) - 1 To 0 Step -1 If StringInStr($atemp_Files[$i], "material-", 0) Then _ArrayDelete($atemp_Files, $i) EndIf Next _ArrayDisplay($atemp_Files, "Material pdf's removed") ; create final result array with 2 dimensions Local $aFiles[UBound($atemp_Files)][2] ; populate 1ST dimension of final result array with complete file name (not path) For $1 = 0 To UBound($atemp_Files) - 1 $aFiles[$1][0] = $atemp_Files[$1] Next ; populate 2ND dimension of final result array with stripped out file name Local $aTmp For $1 = 1 To UBound($aFiles) - 1 $aTmp = StringRegExp($aFiles[$1][0], '[a-zA-Z]{1,4}[0-9]{1,3}', 3) If IsArray($aTmp) Then $aFiles[$1][1] = $aTmp[0] Next _ArrayDisplay($aFiles, "2nd Array filled") _ArrayDelete($aFiles, 0) ; ------------------------------------------------------------------------------------ ; iterate array looking for element with "paint" in the name ; ------------------------------------------------------------------------------------ ;~ For $1 = 0 To UBound($aFiles) - 1 ;~ If StringInStr($aFiles[$1][1], 'ndt') > 0 Then ;~ ConsoleWrite('Found "ndt" in element ' & $1 & ' of array' & @LF) ;~ EndIf ;~ Next Thnx in advance!