Jump to content

if condition


Recommended Posts

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

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