Sign in to follow this  
Followers 0
MarcoCastro

Condition to finalize

4 posts in this topic

Hi Champs,

I need that.... If anyone "control C" is equal to "" (Empty Cell). The process stops. Thanks a lot..

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{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")
Send("{CTRLDOWN}v{CTRLUP}{TAB}{TAB}{ALTDOWN}{TAB}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{TAB}{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")
Send("{CTRLDOWN}v{CTRLUP}{TAB}{TAB}{TAB}{TAB}{ALTDOWN}{TAB}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{DOWN}{LEFT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{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")
Send("{CTRLDOWN}v{CTRLUP}{TAB}{TAB}{ALTDOWN}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{TAB}{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")
Send("{CTRLDOWN}v{CTRLUP}{TAB}{TAB}{TAB}{TAB}{ALTDOWN}{TAB}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{DOWN}{LEFT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{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")
Send("{CTRLDOWN}v{CTRLUP}{ALTDOWN}{TAB}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{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")
Send("{TAB}{TAB}{CTRLDOWN}v{CTRLUP}{TAB}{TAB}{TAB}{TAB}{ALTDOWN}{TAB}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{DOWN}{LEFT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{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")
Send("{CTRLDOWN}v{CTRLUP}{TAB}{TAB}{ALTDOWN}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{TAB}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{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")
Send("{CTRLDOWN}v{CTRLUP}{TAB}{TAB}{TAB}{TAB}{ALTDOWN}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{DOWN}{LEFT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{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")
Send("{CTRLDOWN}v{CTRLUP}{TAB}{TAB}{ALTDOWN}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{RIGHT}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{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")
Send("{CTRLDOWN}v{CTRLUP}{ALTDOWN}{TAB}{ALTUP}")
WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{DOWN}{LEFT}{ESC}{ALTDOWN}{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")
Send("{TAB}{PGDN}")
Sleep(800)

Share this post


Link to post
Share on other sites



After every block of code that deals with Excel - like:

WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}")
oÝ÷ Ù§]¶¬¢w¥wºÚ"µÍYÛÙ]

HHÔ[^]


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

After every block of code that deals with Excel - like:

WinWait("Microsoft Excel - 1.xls","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - 1.xls","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - 1.xls","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - 1.xls","Worksheet Menu Bar")
Send("{CTRLDOWN}c{CTRLUP}{ALTDOWN}{TAB}{ALTUP}")
oÝ÷ Ù§]¶¬¢w¥wºÚ"µÍYÛÙ]

HHÔ[^]
THANKS

Share this post


Link to post
Share on other sites

THANKS

You are welcome.

[size="1"][font="Arial"].[u].[/u][/font][/size]

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  
Followers 0