Sam31 Posted January 23, 2012 Share Posted January 23, 2012 Hi I'm new with AutoIt script so I just have simple question. How can I validate the first caracter of a text? For Exemple: text = apple This is what I want: If first letter of text contain "a" then do X else do Y )) Look simple no? Link to comment Share on other sites More sharing options...
Mikeman27294 Posted January 23, 2012 Share Posted January 23, 2012 (edited) Well that's pretty simple. $Text = "Apple" If StringLeft($Text, 1) = "a" Then ;Do X Else ;Do Y EndIf I don't know what you are doing, but it might pay off for you to take a look at some of the other string functions in the help file. Enjoy. Edited January 23, 2012 by Mikeman27294 Link to comment Share on other sites More sharing options...
Sam31 Posted January 23, 2012 Author Share Posted January 23, 2012 Hey thank you very much! Link to comment Share on other sites More sharing options...
Mikeman27294 Posted January 23, 2012 Share Posted January 23, 2012 No problems. 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