Jump to content
Sign in to follow this  

How to valid first later of a text?

Recommended Posts

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?

Share this post

Link to post
Share on other sites

Well that's pretty simple.

$Text = "Apple"
If StringLeft($Text, 1) = "a" Then
    ;Do X
    ;Do Y

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.


Edited by Mikeman27294

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...