Jump to content

Recommended Posts

Posted

Hello I am detecting the fist 3 characters of a string and I want the script to do something if they match.  This works

Local $smidds = StringMid($readsn,1,3)
ToolTip($smidds,0,0)
If $smidds = "CN0" Then
;do whatever
EndIf

However when I try this it detects every 3 character string and tries to "do whatever".  Not just the CN0, PH0, MY0

Local $smidds = StringMid($readsn,1,3)
ToolTip($smidds,0,0)
If $smidds = "CN0" or "MY0" or "PH0" Then
;do whatever
EndIf

Any help?  And thanks for all the help over the years autoit community!

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
×
×
  • Create New...