EasyGoing Posted April 24, 2007 Share Posted April 24, 2007 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 More sharing options...
Zedna Posted April 24, 2007 Share Posted April 24, 2007 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 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
EasyGoing Posted April 24, 2007 Author Share Posted April 24, 2007 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. Link to comment Share on other sites More sharing options...
evilertoaster Posted April 24, 2007 Share Posted April 24, 2007 well you could error check to be sure you condition fires (check that value of the varible)Humm but really if you doing some work with excel http://www.autoitscript.com/forum/index.php?showtopic=34302would proably work nicely... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now