xAx Posted January 27, 2009 Posted January 27, 2009 (edited) HelloHow 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?RegardsAbduljabbar Edited January 27, 2009 by xAx
Drew Posted January 27, 2009 Posted January 27, 2009 (edited) Help File Autoit -> Function Reference -> String Management -> Edited January 27, 2009 by Drew
Manjish Posted January 27, 2009 Posted January 27, 2009 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
Manjish Posted January 27, 2009 Posted January 27, 2009 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
weaponx Posted January 27, 2009 Posted January 27, 2009 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?".
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