MarcoCastro Posted September 5, 2007 Share Posted September 5, 2007 Whit old version of autoit i got no problem but with the new, appears in this code below error:This is the code:Thanks; Digitador Ingeniería; Carga Paletizado en Tls; $answer = MsgBox(4, "Digitador Ingenieria Apl", "Se procederá a cargar el paletizado de los productos de Nike en WMS. Esto porque el cliente paga por ese servicio. Esta seguro de continuar?")If $answer = 7 Then MsgBox(4096, "Digitador Ingenieria Apl", "Proceso finalizado, No se Cargaron datos") ExitEndIf$answer2 = MsgBox(4, "Digitador Ingenieria Apl", "Desea que el teclado y el Mouse se bloqueen durante el proceso? IMPORTANTE: El proceso solo se detendra al finalizar el listado de Excel.")If $answer = 6 ThenBlockinput(1)endifWhile 1 ;For $i= 1 to 500000 Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) ;Copia el Codigo WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") If ClipGet() = @CRLF Then Blockinput(0) MsgBox(4096, "Autimatico", "Work Over", 5000000) Exit WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") ;esperar la ventana del menu 9-1, Y PEGAR CODIGO Do Sleep(50) Until PixelChecksum(37, 88, 135, 132) = 3013036428 Send("{CTRLDOWN}v{CTRLUP}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{ENTER}{DOWN}{LEFT}{LEFT}{LEFT}10{ENTER}") Sleep(50) ;COPIAR PR POR MC WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{RIGHT}{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") ;ESPERAR LA VENTANA DE CONFIGURACION DE PALEATIZADO Y PEGAR PR POR MC WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Do Sleep(50) Until PixelChecksum(37, 88, 135, 132) = 1489390669 Sleep(50) If PixelChecksum(78, 422, 306, 499) = 779179013 Then Send("{F3}{UP}{RIGHT}{RIGHT}{RIGHT}") WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{DOWN}{LEFT}{LEFT}{ESC}") ContinueLoop EndIf Send("{TAB}{TAB}WMC{TAB}{CTRLDOWN}v{CTRLUP}{TAB}PR{TAB}{TAB}PL{TAB}{ALTDOWN}{TAB}{ALTUP}") ;COPIAR Mc por Pallet WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") ; PEGAR Mc por Pallet WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Send("{CTRLDOWN}v{CTRLUP}{TAB}mc{TAB}{ENTER}{ALTDOWN}{TAB}{ALTUP}") ; COPIAR BASE WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") ;ESPERAR CAMBIO DE PANTALLA A VENTANA TIE & tIER Do Sleep(50) Until PixelChecksum(92, 154, 641, 251) = 1577021462 Send("{CTRLDOWN}v{CTRLUP}{TAB}{ALTDOWN}{TAB}{ALTUP}") Sleep(50) ;COPIA ALTURA WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") ;PEGA ALTURA WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Send("{CTRLDOWN}v{CTRLUP}{TAB}{ENTER}{F3}{UP}{RIGHT}{RIGHT}{RIGHT}{ALTDOWN}{TAB}{ALTUP}") WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{DOWN}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{ESC}") ;NextWend Link to comment Share on other sites More sharing options...
Nahuel Posted September 5, 2007 Share Posted September 5, 2007 isn't it because the NEXT is commented? Link to comment Share on other sites More sharing options...
ksmith247 Posted September 5, 2007 Share Posted September 5, 2007 (edited) Whit old version of autoit i got no problem but with the new, appears in this code below error: This is the code: Thanks expandcollapse popup; Digitador Ingeniería ; Carga Paletizado en Tls ; $answer = MsgBox(4, "Digitador Ingenieria Apl", "Se procederá a cargar el paletizado de los productos de Nike en WMS. Esto porque el cliente paga por ese servicio. Esta seguro de continuar?") If $answer = 7 Then MsgBox(4096, "Digitador Ingenieria Apl", "Proceso finalizado, No se Cargaron datos") Exit EndIf $answer2 = MsgBox(4, "Digitador Ingenieria Apl", "Desea que el teclado y el Mouse se bloqueen durante el proceso? IMPORTANTE: El proceso solo se detendra al finalizar el listado de Excel.") If $answer = 6 Then Blockinput(1) endif While 1 ;For $i= 1 to 500000 Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) ;Copia el Codigo WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") If ClipGet() = @CRLF Then Blockinput(0) MsgBox(4096, "Autimatico", "Work Over", 5000000) Exit WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") ;esperar la ventana del menu 9-1, Y PEGAR CODIGO Do Sleep(50) Until PixelChecksum(37, 88, 135, 132) = 3013036428 Send("{CTRLDOWN}v{CTRLUP}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{ENTER}{DOWN}{LEFT}{ LEFT}{LEFT}10{ENTER}") Sleep(50) ;COPIAR PR POR MC WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{RIGHT}{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") ;ESPERAR LA VENTANA DE CONFIGURACION DE PALEATIZADO Y PEGAR PR POR MC WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Do Sleep(50) Until PixelChecksum(37, 88, 135, 132) = 1489390669 Sleep(50) If PixelChecksum(78, 422, 306, 499) = 779179013 Then Send("{F3}{UP}{RIGHT}{RIGHT}{RIGHT}") WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{DOWN}{LEFT}{LEFT}{ESC}") ContinueLoop EndIf Send("{TAB}{TAB}WMC{TAB}{CTRLDOWN}v{CTRLUP}{TAB}PR{TAB}{TAB}PL{TAB}{ALTDOWN}{TAB}{ALTUP}") ;COPIAR Mc por Pallet WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") ; PEGAR Mc por Pallet WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Send("{CTRLDOWN}v{CTRLUP}{TAB}mc{TAB}{ENTER}{ALTDOWN}{TAB}{ALTUP}") ; COPIAR BASE WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") ;ESPERAR CAMBIO DE PANTALLA A VENTANA TIE & tIER Do Sleep(50) Until PixelChecksum(92, 154, 641, 251) = 1577021462 Send("{CTRLDOWN}v{CTRLUP}{TAB}{ALTDOWN}{TAB}{ALTUP}") Sleep(50) ;COPIA ALTURA WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}") ;PEGA ALTURA WinWait("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") If Not WinActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Then WinActivate("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") WinWaitActive("Wmsp.rsf - WRQ Reflection - IBM 5250 Terminal", "Standard") Send("{CTRLDOWN}v{CTRLUP}{TAB}{ENTER}{F3}{UP}{RIGHT}{RIGHT}{RIGHT}{ALTDOWN}{TAB}{ALTUP}") WinWait("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") If Not WinActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Then WinActivate("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") WinWaitActive("Microsoft Excel - Carga paleatizado a Tls.xls", "Barra de menús de la") Send("{DOWN}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{ESC}") ;Next Wend<!--QuoteEnd--></div><!--QuoteEEnd-->oÝ÷ ØȬ²)àwH~åw¹Ñ8ZµÊ.ÖÞÖ®¶s`b6ÆvWBÒ5$ÄbFVà &Æö6´çWB ×6t&÷CbÂgV÷C´WFÖF6ògV÷C²ÂgV÷Cµv÷&²÷fW"gV÷C²ÂS W@ VæD` Edited September 5, 2007 by ksmith247 Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 5, 2007 Share Posted September 5, 2007 Just from simply copying and pasting your code, I get the following errors: ERROR: syntax error (illegal character) Send(" ~~~~~^ Fix: Could be just the spacing issue when I copied and pasted it. If not then just remove the line feed. C:\New AutoIt v3 Script.au3(190,1) : ERROR: missing EndIf. (illegal character) Wend ^ C:\New AutoIt v3 Script.au3(39,27) : REF: missing EndIf. If ClipGet() = @CRLF Then ~~~~~~~~~~~~~~~~~~~~~~~~~~^ The fix to the last two errors would be to add the Endif. (Just like someone else pointed out) Good luck. Link to comment Share on other sites More sharing options...
MarcoCastro Posted September 6, 2007 Author Share Posted September 6, 2007 Thanks Champs... 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