Sign in to follow this  
Followers 0
EasyGoing

if condition

4 posts in this topic

I am trying to copy a cell in excel and then valuate it.

here is my code that doe snot work. I get a error

WinActivate("Microsoft Excel - question.xls")

WinWaitActive("Microsoft Excel - question.xls")

Send("^c")

Sleep(100)

$occupation = ClipGet()

If

if $occupation = "Tenet" Then

Send("{ENTER}")

Sleep(100)

SEND("^V")

Else

Send("{ENTER}")

Sleep(100)

SEND("Did not work")

EndIf

Share this post


Link to post
Share on other sites



remove one "if":

WinActivate("Microsoft Excel - question.xls")
WinWaitActive("Microsoft Excel - question.xls")
Send("^c")
Sleep(100)

$occupation = ClipGet()

If $occupation = "Tenet" Then
    Send("{ENTER}")
    Sleep(100)
    Send("^V")
Else
    Send("{ENTER}")
    Sleep(100)
    Send("Did not work")
EndIf

Share this post


Link to post
Share on other sites

Thank you, but it still does not work.

I copied and pasted your codes and it jumps to the else statement " It does not work". I does not even do the other send commands.

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