Jump to content

stringlen or value character length


Recommended Posts

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 by 13lack13lade
Link to comment
Share on other sites

$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

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...