Jump to content
Sign in to follow this  
MarcoCastro

Condition "If" to begin again

Recommended Posts

MarcoCastro

hi champions , I need that when the condition is real, :

If PixelChecksum(78,422,306,499) = 1104243226 Then ....

Then make this,

Send("{F3}")

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}")

And that it returns to the beginning of the code...

YThanks...

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 Exit MsgBox(4096, "Autimatico", "Work Over", 5000000)





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) = 1885248931
Send("{CTRLDOWN}v{CTRLUP}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{SPACE}{ENTER}{DOWN}{LEFT}{L
EFT}{LEFT}10{ENTER}{TAB}{TAB}WMC{ALTDOWN}{TAB}{ALTUP}")




;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}")







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 DE CONFIGURACION DE PALEATIZADO Y PEGAR PR POR MC


Do
    Sleep(50)
Until PixelChecksum(37,88,135,132) = 2460458021

;**********************************

IF PixelChecksum(78,422,306,499) = 1104243226 THEN 

Here

;********************************** 

Send("{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) = 3763317481


Send("{CTRLDOWN}v{CTRLUP}{TAB}{ALTDOWN}{TAB}{ALTUP}")




;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
Edited by MarcoCastro

Share this post


Link to post
Share on other sites
SmOke_N

Look at "loop" in the help file:

Do/Until

While/Wend

For/Next


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
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
Sign in to follow this  

×