13lack13lade Posted April 16, 2014 Share Posted April 16, 2014 (edited) hi so im working with a spreadsheet and need to determine if the cell is less than 5 then do this else do that. so i tried using this but it didnt work ; is this not the correct way to use it? easier to just use len in excel then use if $cellLEN = <5 then send tab x 3 else send tab x 2 ? if stringlen($code) = "<5" then send("{TAB 3}") Else send("{TAB 2}") EndIf Edited April 16, 2014 by 13lack13lade Link to comment Share on other sites More sharing options...
GordonFreeman Posted April 16, 2014 Share Posted April 16, 2014 $sVar = "AutoIt" If StringLen($sVar) <= 5 Then MsgBox(0, "", "Equal or less") Else MsgBox(0, "", "More than") EndIf Frabjous Installation Link to comment Share on other sites More sharing options...
13lack13lade Posted April 16, 2014 Author Share Posted April 16, 2014 (edited) what about just less than? or would you go >= 4 Edited April 16, 2014 by 13lack13lade Link to comment Share on other sites More sharing options...
GordonFreeman Posted April 16, 2014 Share Posted April 16, 2014 $sVar = "Autoi" $iVarLen = StringLen($sVar) MsgBox("","",$iVarLen) If $iVarLen > 5 Then MsgBox(0,"","More than 5") ElseIf $iVarLen < 5 Then MsgBox(0,"","Less than 5") ElseIf $iVarLen = 5 Then MsgBox(0,"","equal 5") EndIf Please use help file. Press F1 when scite Win is activated search index tab, then type "operators" and you get a full list with the operators of autoit Frabjous Installation Link to comment Share on other sites More sharing options...
13lack13lade Posted April 16, 2014 Author Share Posted April 16, 2014 legend thank you! stupid me immediately jumped to the conclusion maybe stringlen not the right thing to use etc but it was, i just fail at the simple things haha 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