Jump to content

Condition to finalize


Recommended Posts

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)
Link to comment
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]

Link to comment
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
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...