Jump to content

Autoit error APPCRASH


Recommended Posts

please I have a problem with autoit, nose if it is my code or something else.

Because when I run the autoit script I get this message after executing it

 

Firma con problemas:
  Nombre del evento de problema:    APPCRASH
  Nombre de la aplicación:    autoit3.exe
  Versión de la aplicación:    3.3.14.5
  Marca de tiempo de la aplicación:    5aaa71bf
  Nombre del módulo con errores:    OLEAUT32.dll
  Versión del módulo con errores:    6.1.7601.23775
  Marca de tiempo del módulo con errores:    58f4db68
  Código de excepción:    c0000005
  Desplazamiento de excepción:    000210b8
  Versión del sistema operativo:    6.1.7601.2.1.0.256.48
  Id. de configuración regional:    10250
  Información adicional 1:    0a9e
  Información adicional 2:    0a9e372d3b4ad19135b953a78882e789
  Información adicional 3:    0a9e
  Información adicional 4:    0a9e372d3b4ad19135b953a78882e789

Lea nuestra declaración de privacidad en línea:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0c0a

Si la declaración de privacidad en línea no está disponible, lea la declaración de privacidad sin conexión:
  C:\Windows\system32\es-ES\erofflps.txt

 

============================================

my script activates a web page and searches for a search engine and copies and pastes them in an excel file and saves them at the end.

But in a record quantity of 1500 number to look up your data, while looking for that message appears. help!

Link to comment
Share on other sites

#include <File.au3>

GLOBAL $g_bPaused = FALSE

MAIN_ALTAMIRA_MN()

Func MAIN_ALTAMIRA_MN()

HOTKEYSET("{PAUSE}", "HOTKEYPRESSED")
HOTKEYSET("{ESC}", "HOTKEYPRESSED")

$MSGBOX_ALT = MSGBOX($MB_YESNO, "MENSAJE", "?Deseas Ejecutar Script - Altamira?")

SELECT
;*************************
CASE $MSGBOX_ALT = 6 ;YES
;*************************

$VENT_ALT = WINACTIVATE("https://pagina web", "")
$VAL_ALT = WINGETTITLE($VENT_ALT)
WINSETSTATE("https://pagina web", "", @SW_MAXIMIZE)

IF($VAL_ALT == "https://pagina web") THEN ;INICIO IF_1

   $cont1_alt = 0 ;Inicializa contador para registro que no ingresa

   Local $iCountLines
   $iCountLines = _FileCountLines("D:\ROBOT\Telefonos.txt") ; Recuperar el n?mero de l?neas en el script actual
   MsgBox($MB_SYSTEMMODAL, "", "Existen " & $iCountLines & " l?neas en este archivo.") ;muestra la cantidad encontrada
 

   $file = FileOpen("D:\ROBOT\Telefonos.txt", 0) ;abre el archivo de texto

   Local $oExcel = ObjCreate("Excel.Application")
;~    $oExcel.visible = 1
   $oExcel.workbooks.add
 

   LOCAL $FECHAX_ALT = @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC

   Local $i = 0
   local $a = 1

   While $i <= $iCountLines

      $Result = FileReadLine($file) ; lee el archivo indicado
      If @error = -1 Then ExitLoop

         WINACTIVATE("https://pagina web", "")

         $cont1_alt = $cont1_alt + 1
         TOOLTIP("Registro: ( " & $cont1_alt & " de " & $iCountLines & " )", 20, 100, "Status Robot OnLine", 1, 1)

         MOUSECLICK("left", 260, 133, 2) ;Caja de texto Consulta Numero
         SEND("{DEL}")
         SEND($Result)
         SEND("{TAB}")
         SEND("{ENTER}")

         SEND("{TAB}")
         SEND($Result)
         SEND("{TAB}")
         SEND("{ENTER}")

         SEND("{TAB}")
         SEND($Result)
         SEND("{TAB}")
         SEND("{ENTER}")
 

         ;Copiar contenido de busqueda Consulta Numero
         MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 159, 667, 279)
         SEND("^c")
         $cont_cons_num = StringReplace(CLIPGET(),@CRLF, "")
 

         ;Copiar contenido de busqueda Saldo en supercargas
         MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 360, 667, 485)
         SEND("^c")
         $cont_saldo_supercargas = StringReplace(CLIPGET(),@CRLF, "")

         ;Copiar contenido de busqueda Saldo en bolsas
         MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 561, 667, 690)
         SEND("^c")
         $cont_saldo_bolsas = StringReplace(CLIPGET(),@CRLF, "")


         MOUSECLICK("left", 670, 370, 3) ;Caja de texto Consulta Numero

         LOCAL $FECHA_ACTUAL = @MDAY & "-" & @MON & "-" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC

        $oExcel.activesheet.cells($a+1, 1).value = $Result
        $oExcel.activesheet.cells($a+1, 2).value = $FECHA_ACTUAL
        $oExcel.activesheet.cells($a+1, 3).value = @IPAddress1
        $oExcel.activesheet.cells($a+1, 4).value = $cont_cons_num
        $oExcel.activesheet.cells($a+1, 5).value = $cont_saldo_supercargas
        $oExcel.activesheet.cells($a+1, 6).value = $cont_saldo_bolsas

      $a = $a + 1
      $i = $i + 1

   WEnd

   Local $filename = "D:\ROBOT\Resultados\Resultado_" & $FECHAX_ALT & ".xls"
   $oExcel.Application.DisplayAlerts = 0
   $oExcel.Application.ScreenUpdating = 0
   $oExcel.ActiveWorkBook.SaveAs($filename, 1, Default, Default, Default, Default, 2, 1)

   $oExcel.Quit

ELSE ;MEDIO IF_1
   MSGBOX(16, "Alerta", "Abrir Aplication", 0)
ENDIF ;FIN IF_1

;************************
CASE $MSGBOX_ALT = 7 ;NO
;************************

ENDSELECT

EndFunc

FUNC HOTKEYPRESSED()
    SWITCH @HOTKEYPRESSED
        CASE "{PAUSE}"
            $g_bPaused = NOT $g_bPaused
            WHILE $g_bPaused
                SLEEP(100)
                TOOLTIP('EXCLAMACION "PAUSA"', 0, 0)
            WEND
            TOOLTIP("")
        CASE "{ESC}"
            MSGBOX($MB_ICONINFORMATION, "INFO", "SCRIPT TERMINADO.")
            EXIT
    ENDSWITCH
ENDFUNC

 

================================

 

what it does is: copy some txt file phone numbers, then paste a phone number in a web page looking for data of that number and when it finds it copies that data and sticks it in an excel internally and when it finishes saving it.

I do not use include <excel.au3> because I see the same error.

Link to comment
Share on other sites

ok, thanks. using the Code Tags <> it should look like this, so others can easily read and copy. Now we can look at it.

#include <File.au3>

GLOBAL $g_bPaused = FALSE

MAIN_ALTAMIRA_MN()

Func MAIN_ALTAMIRA_MN()

HOTKEYSET("{PAUSE}", "HOTKEYPRESSED")
HOTKEYSET("{ESC}", "HOTKEYPRESSED")

$MSGBOX_ALT = MSGBOX($MB_YESNO, "MENSAJE", "?Deseas Ejecutar Script - Altamira?")

SELECT
;*************************
CASE $MSGBOX_ALT = 6 ;YES
;*************************

$VENT_ALT = WINACTIVATE("https://pagina web", "")
$VAL_ALT = WINGETTITLE($VENT_ALT)
WINSETSTATE("https://pagina web", "", @SW_MAXIMIZE)

IF($VAL_ALT == "https://pagina web") THEN ;INICIO IF_1

   $cont1_alt = 0 ;Inicializa contador para registro que no ingresa

   Local $iCountLines
   $iCountLines = _FileCountLines("D:\ROBOT\Telefonos.txt") ; Recuperar el n?mero de l?neas en el script actual
   MsgBox($MB_SYSTEMMODAL, "", "Existen " & $iCountLines & " l?neas en este archivo.") ;muestra la cantidad encontrada
 

   $file = FileOpen("D:\ROBOT\Telefonos.txt", 0) ;abre el archivo de texto

   Local $oExcel = ObjCreate("Excel.Application")
;~    $oExcel.visible = 1
   $oExcel.workbooks.add
 

   LOCAL $FECHAX_ALT = @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC

   Local $i = 0
   local $a = 1

   While $i <= $iCountLines

      $Result = FileReadLine($file) ; lee el archivo indicado
      If @error = -1 Then ExitLoop

         WINACTIVATE("https://pagina web", "")

         $cont1_alt = $cont1_alt + 1
         TOOLTIP("Registro: ( " & $cont1_alt & " de " & $iCountLines & " )", 20, 100, "Status Robot OnLine", 1, 1)

         MOUSECLICK("left", 260, 133, 2) ;Caja de texto Consulta Numero
         SEND("{DEL}")
         SEND($Result)
         SEND("{TAB}")
         SEND("{ENTER}")

         SEND("{TAB}")
         SEND($Result)
         SEND("{TAB}")
         SEND("{ENTER}")

         SEND("{TAB}")
         SEND($Result)
         SEND("{TAB}")
         SEND("{ENTER}")
 

         ;Copiar contenido de busqueda Consulta Numero
         MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 159, 667, 279)
         SEND("^c")
         $cont_cons_num = StringReplace(CLIPGET(),@CRLF, "")
 

         ;Copiar contenido de busqueda Saldo en supercargas
         MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 360, 667, 485)
         SEND("^c")
         $cont_saldo_supercargas = StringReplace(CLIPGET(),@CRLF, "")

         ;Copiar contenido de busqueda Saldo en bolsas
         MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 561, 667, 690)
         SEND("^c")
         $cont_saldo_bolsas = StringReplace(CLIPGET(),@CRLF, "")


         MOUSECLICK("left", 670, 370, 3) ;Caja de texto Consulta Numero

         LOCAL $FECHA_ACTUAL = @MDAY & "-" & @MON & "-" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC

        $oExcel.activesheet.cells($a+1, 1).value = $Result
        $oExcel.activesheet.cells($a+1, 2).value = $FECHA_ACTUAL
        $oExcel.activesheet.cells($a+1, 3).value = @IPAddress1
        $oExcel.activesheet.cells($a+1, 4).value = $cont_cons_num
        $oExcel.activesheet.cells($a+1, 5).value = $cont_saldo_supercargas
        $oExcel.activesheet.cells($a+1, 6).value = $cont_saldo_bolsas

      $a = $a + 1
      $i = $i + 1

   WEnd

   Local $filename = "D:\ROBOT\Resultados\Resultado_" & $FECHAX_ALT & ".xls"
   $oExcel.Application.DisplayAlerts = 0
   $oExcel.Application.ScreenUpdating = 0
   $oExcel.ActiveWorkBook.SaveAs($filename, 1, Default, Default, Default, Default, 2, 1)

   $oExcel.Quit

ELSE ;MEDIO IF_1
   MSGBOX(16, "Alerta", "Abrir Aplication", 0)
ENDIF ;FIN IF_1

;************************
CASE $MSGBOX_ALT = 7 ;NO
;************************

ENDSELECT

EndFunc

FUNC HOTKEYPRESSED()
    SWITCH @HOTKEYPRESSED
        CASE "{PAUSE}"
            $g_bPaused = NOT $g_bPaused
            WHILE $g_bPaused
                SLEEP(100)
                TOOLTIP('EXCLAMACION "PAUSA"', 0, 0)
            WEND
            TOOLTIP("")
        CASE "{ESC}"
            MSGBOX($MB_ICONINFORMATION, "INFO", "SCRIPT TERMINADO.")
            EXIT
    ENDSWITCH
ENDFUNC

 

================================

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

and, to be clear, you did not use @water's Excel UDF because it gave the same OLEAUT32.DLL error?

Quote

Signature with problems:
  Name of the problem event: APPCRASH
  Application name: autoit3.exe
  Application version: 3.3.14.5
  Application timestamp: 5aaa71bf
  Module name with errors: OLEAUT32.dll
  Module version with errors: 6.1.7601.23775
  Module time stamp with errors: 58f4db68
  Exception code: c0000005
  Exception shift: 000210b8
  Operating system version: 6.1.7601.2.1.0.256.48
  Locale ID: 10250
  Additional information 1: 0a9e
  Additional information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional information 3: 0a9e
  Additional information 4: 0a9e372d3b4ad19135b953a78882e789

can you give me a dummy text file to test with? oh and what version of office?

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

Your script does not do any error checking after working with an Excel object.
So if the statement fails the next will be executed and might crash the script.
Either use the Excel UDF and check @error after each call to an _Excel_* function (as is done ine ach example script provided with the Excel UDF) or add your own COM error handler (check the help file for ObjEvent for an example).

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

also, that script cannot possibly work. It does not even compile! how can you not declare your variables and run this? post something that can be tested. i have little patience, else, you can just help yourself.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

please I have a problem with autoit, nose if it is my code or something else.

Because when I run the autoit script I get this message after executing it

Firma con problemas:
  Nombre del evento de problema:    APPCRASH
  Nombre de la aplicación:    autoit3.exe
  Versión de la aplicación:    3.3.14.5
  Marca de tiempo de la aplicación:    5aaa71bf
  Nombre del módulo con errores:    OLEAUT32.dll
  Versión del módulo con errores:    6.1.7601.23775
  Marca de tiempo del módulo con errores:    58f4db68
  Código de excepción:    c0000005
  Desplazamiento de excepción:    000210b8
  Versión del sistema operativo:    6.1.7601.2.1.0.256.48
  Id. de configuración regional:    10250
  Información adicional 1:    0a9e
  Información adicional 2:    0a9e372d3b4ad19135b953a78882e789
  Información adicional 3:    0a9e
  Información adicional 4:    0a9e372d3b4ad19135b953a78882e789

Lea nuestra declaración de privacidad en línea:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0c0a

Si la declaración de privacidad en línea no está disponible, lea la declaración de privacidad sin conexión:
  C:\Windows\system32\es-ES\erofflps.txt

===============================================================================================

my script activates a web page and searches for a search engine and copies and pastes them in an excel file and saves them at the end.

But in a record quantity of 1500 number to look up your data, while looking for that message appears. help!

 

#include <Excel.au3>
#include <MsgBoxConstants.au3>

Global $oExcel = ""
Global $oWorkbook = ""
Global $dat = ""
Global $i = 1
Global $FECHAX_ALT = ""
Global $sResult = ""
Global $cont_cons_num = "", $cont_saldo_supercargas = "", $cont_saldo_bolsas = ""
Global $cont1_alt = 0
Global $FECHA_ACTUAL = ""
Global $otro = ""

; Crear un objeto de aplicación y abrir un libro de ejercicios de ejemplo
$oExcel = _Excel_Open()
IF $oExcel == 0 THEN
   MSGBOX(16, "Alerta", "Error al crear el objeto de la aplicación de Excel: " & @CRLF & "@error = " & @error & ", @extended = " & @extended, 0)
   CALL("CAPTURA_LOG", "Error al crear el objeto de la aplicación de Excel")
   CALL("CAPTURA_LOG", "FIN Robot: Busqueda Altamira ***************")
   CALL("CAPTURA_LOG", "CIERRE roBOT!!!!!")
   EXIT
ENDIF

$oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "\telefonos.xls")
if $oWorkbook == 0 then
   MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example", "Error opening workbook '" & @ScriptDir & "\telefonos.xls'." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
   CALL("CAPTURA_LOG", "Error al abrir archivo Excel 'D:\ROBOT\telefonos.xls'")
   CALL("CAPTURA_LOG", "FIN Robot: Busqueda Altamira ***************")
   CALL("CAPTURA_LOG", "CIERRE roBOT!!!!!")
   _Excel_Close($oExcel)
   Exit
endif

$dat = $oExcel.ActiveWorkBook.ActiveSheet.UsedRange.Rows.Count ; Identifica el número de filas que tenemos definida en la hoja
      $oExcel.ActiveSheet.Cells(1,1).Formula = "Telefono" ;Negrita A1
      $oExcel.ActiveSheet.Cells(1,1).Font.Bold = True ;Negrita A1
      $oExcel.ActiveSheet.Cells(1,1).Font.Italic = True ;Cursiva A1
      $oExcel.ActiveSheet.Cells(1,1).Font.Underline = True ;Subrayado A1
      $oExcel.ActiveSheet.Columns("A:A").ColumnWidth = 12 ; Anchura de la columna A
      $oExcel.ActiveSheet.Cells(1,2).Formula = "Fecha Busqueda" ;Negrita B1
      $oExcel.ActiveSheet.Cells(1,2).Font.Bold = True ;Negrita B1
      $oExcel.ActiveSheet.Cells(1,2).Font.Italic = True ;Cursiva B1
      $oExcel.ActiveSheet.Cells(1,2).Font.Underline = True ;Subrayado B1
      $oExcel.ActiveSheet.Columns("B:B").ColumnWidth = 16 ; Anchura de la columna B
      $oExcel.ActiveSheet.Cells(1,3).Formula = "Direccion IP" ;Negrita C1
      $oExcel.ActiveSheet.Cells(1,3).Font.Bold = True ;Negrita C1
      $oExcel.ActiveSheet.Cells(1,3).Font.Italic = True ;Cursiva C1
      $oExcel.ActiveSheet.Cells(1,3).Font.Underline = True ;Subrayado C1
      $oExcel.ActiveSheet.Columns("C:C").ColumnWidth = 16 ; Anchura de la columna C
      $oExcel.ActiveSheet.Cells(1,4).Formula = "Consulta Numero" ;Negrita D1
      $oExcel.ActiveSheet.Cells(1,4).Font.Bold = True ;Negrita D1
      $oExcel.ActiveSheet.Cells(1,4).Font.Italic = True ;Cursiva D1
      $oExcel.ActiveSheet.Cells(1,4).Font.Underline = True ;Subrayado D1
      $oExcel.ActiveSheet.Columns("D:D").ColumnWidth = 62 ; Anchura de la columna D
      $oExcel.ActiveSheet.Cells(1,5).Formula = "Saldos en supercargas" ;Negrita E1
      $oExcel.ActiveSheet.Cells(1,5).Font.Bold = True ;Negrita E1
      $oExcel.ActiveSheet.Cells(1,5).Font.Italic = True ;Cursiva E1
      $oExcel.ActiveSheet.Cells(1,5).Font.Underline = True ;Subrayado E1
      $oExcel.ActiveSheet.Columns("E:E").ColumnWidth = 60 ; Anchura de la columna E
      $oExcel.ActiveSheet.Cells(1,6).Formula = "Saldos en bolsas" ;Negrita F1
      $oExcel.ActiveSheet.Cells(1,6).Font.Bold = True ;Negrita F1
      $oExcel.ActiveSheet.Cells(1,6).Font.Italic = True ;Cursiva F1
      $oExcel.ActiveSheet.Cells(1,6).Font.Underline = True ;Subrayado F1
      $oExcel.ActiveSheet.Columns("F:F").ColumnWidth = 43 ; Anchura de la columna F

$FECHAX_ALT = @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC

WHILE $i <= $dat-1
            $cel = "A"&$i+1
   $Result = _Excel_RangeRead($oWorkbook, Default, $cel)

   CALL("CAPTURA_LOG", "Registro Nro: " & $i & " - " & $cel)
   CALL("CAPTURA_LOG", "Telefono: " & $Result)

   If $sResult == 0 Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 1", "Error reading from workbook." & @CRLF & "@error = " & @error & ", @extended = " & @extended)

      WINACTIVATE("pagina web") ; pagina donde busca los resultados

      $cont1_alt = $cont1_alt + 1
      TOOLTIP("Registro: ( " & $cont1_alt & " de " & $dat-1 & " )", 20, 100, "Status Robot OnLine", 1, 1)

      MOUSECLICK("left", 286, 140, 2) ;Caja de texto Consulta Numero  --> 268, 133
      SEND("{DEL}")
      SEND($Result)
      SEND("{TAB}")
      SEND("{ENTER}")
      CALL("CAPTURA_LOG", "Busqueda 1 Consulta Numero: " & $Result)
      ;********Saldo en supercargas
      SEND("{TAB}")
      SEND($Result)
      SEND("{TAB}")
      SEND("{ENTER}")
      CALL("CAPTURA_LOG", "Busqueda 2 Saldo en supercargas: " & $Result)
      ;********Saldo en bolsas
      SEND("{TAB}")
      SEND($Result)
      SEND("{TAB}")
      SEND("{ENTER}")
      CALL("CAPTURA_LOG", "Busqueda 3 Saldo en bolsas: " & $Result)

      ;Copiar contenido de busqueda Consulta Numero
      MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 167, 725, 303) ; 277, 159, 667, 279
      SEND("^c")
      $cont_cons_num = CLIPGET()
      CALL("CAPTURA_LOG", "Contenido 1 Consulta Numero: ")

      ;Copiar contenido de busqueda Saldo en supercargas
      MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 390, 727, 533) ;277, 360, 667, 485
      SEND("^c")
      $cont_saldo_supercargas = CLIPGET()
      CALL("CAPTURA_LOG", "Contenido 2 Saldo en supercargas: ")

      ;Copiar contenido de busqueda Saldo en bolsas
      MOUSECLICKDRAG($MOUSE_CLICK_LEFT, 277, 613, 724, 747) ;277, 561, 667, 690
      SEND("^c")
      $cont_saldo_bolsas = CLIPGET()
      CALL("CAPTURA_LOG", "Contenido 3 Saldo en bolsas: ")

      ;*****Coloca al inicio supercargas:
      MOUSECLICK("left", 738, 401, 3) ;Caja de texto Consulta Numero  ; 670, 370

      $FECHA_ACTUAL = @MDAY & "-" & @MON & "-" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC

      $oExcel.Activesheet.Cells($i+1,2).Formula = $FECHA_ACTUAL ;celda de fila n y columna 2
      $oExcel.Activesheet.Cells($i+1,3).Formula = @IPAddress1 ;celda de fila n y columna 3
      $oExcel.Activesheet.Cells($i+1,4).Formula = $cont_cons_num ;celda de fila n y columna 4
      $oExcel.Activesheet.Cells($i+1,5).Formula = $cont_saldo_supercargas ;celda de fila n y columna 5
      $oExcel.Activesheet.Cells($i+1,6).Formula = $cont_saldo_bolsas ;celda de fila n y columna 6
      CALL("CAPTURA_LOG", "Datos Enviados a Excel: " & $Result)
      $i = $i + 1
   WEND

MOUSECLICK("left", 710, 315, 1)
$otro = "D:\ROBOT\Resultados\Resultado_" & $FECHAX_ALT & ".xls"
_Excel_BookSaveAs($oWorkbook, $otro, $xlWorkbookDefault, True)
_Excel_Close($oExcel, True)
CALL("CAPTURA_LOG", "Datos Guardados en Excel: D:\ROBOT\Resultados\Resultado_" & $FECHAX_ALT & ".xls")
;VENTANA DE RESULTADOS
MSGBOX($MB_ICONINFORMATION, "Script Altamira Finalizado", "Resultado Registros Buscados: " & @CRLF & @CRLF & "Total:  " & $i-1, 0)
TOOLTIP("") ;Para que se cierre el tooltip al finalizar el while.

CALL("CAPTURA_LOG", "FIN Robot: Busqueda ***************")

FUNC CAPTURA_LOG($NAME) ;Funcion para guardar archivo.log
   ;INICIO LOG
   IF @Error = 1 THEN
      MSGBOX (0,"","No Files\Folders Found.")
   ENDIF
   $log = FILEOPEN("D:\ROBOT\Rlog\" & @YEAR &"\" & @MON & "\Log_" & @YEAR & @MON & @MDAY & ".log", 9)
   _FileWriteLog($log, "IP: " & @IPAddress1 & " Mensaje: " & $NAME)
   FILECLOSE($log)
   ;FIN LOG
ENDFUNC
Edited by Ans1021
Link to comment
Share on other sites

  • Developers

@Ans1021,

Please stick to the thread already open and refrain from opening new threads on the same topic.
-Merged-

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...