magace Posted October 4, 2016 Posted October 4, 2016 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!
Anoop Posted October 4, 2016 Posted October 4, 2016 Try If $smidds = "CN0" or $smidds = "MY0" or $smidds = "PH0" Then
Anoop Posted October 4, 2016 Posted October 4, 2016 3 hours ago, magace said: Thanks! That worked. Please mark the topic for Solved. It should be a good practice.
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