Jump to content
Sign in to follow this  
xAx

Get word position

Recommended Posts

xAx

Hello

How can get a word position in string?

for example I want to get autoit position from the string below:

$pos=?????("I like autoit scripts")

$pos must return 8.

I have other question:

How can I cut string from an other?

Regards

Abduljabbar

Edited by xAx

Abduljabbar Faaiz Al_Kazzazx A x Company islamway.com

Share this post


Link to post
Share on other sites
Drew

Help File

Autoit -> Function Reference -> String Management ->

Edited by Drew

Share this post


Link to post
Share on other sites
Manjish

Use this to get string position:

$string=StringInStr("I Like AutoIT","AutoIT")
msgbox(4096,"",$string)

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites
Manjish

To get a specific word from a string, u can use either stringleft, stringright,stringmid functions.

These will return u a specific no. of letters, in a selected range.

eg to get AutoIT from "I Love AutoIT"

MsgBox(4096,"",StringMid( "I Love AutoIT",8,13))

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites
weaponx

To get a specific word from a string, u can use either stringleft, stringright,stringmid functions.

These will return u a specific no. of letters, in a selected range.

eg to get AutoIT from "I Love AutoIT"

MsgBox(4096,"",StringMid( "I Love AutoIT",8,13))
This doesn't make much sense because the keyword is pre-existent. This would be like me asking "What is your name Manjish?".

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  

×