simpleraison Posted December 2, 2010 Share Posted December 2, 2010 (edited) Ok when i perform a certain text a text field within the application is populated with some text how do i use autoit to first text if there is a portion of specific text in the text field before proceeding. Notice i said portion so even if it only checks the first few letters or a word that exists i think that is sufficient enough for this to work! Any help would be greatly appreciated. :-) Edited December 3, 2010 by simpleraison Link to comment Share on other sites More sharing options...
JohnOne Posted December 3, 2010 Share Posted December 3, 2010 "the application" What application, your own ? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
simpleraison Posted December 3, 2010 Author Share Posted December 3, 2010 (edited) "the application"What application, your own ?Its a third party application that was developed by a programmer on a bespoke basis. Hence the reason i use 'the application' as opposed to giving the actual name as thats about the same level of insight as the other as noone will have heard of it or is very unlikely anyone else owns it unless the programmer who created it browses these boards! Edited December 3, 2010 by simpleraison Link to comment Share on other sites More sharing options...
somdcomputerguy Posted December 3, 2010 Share Posted December 3, 2010 ..if there is a portion of specific text in the text field before proceeding..Maybe ControlGetText and StringInStr can be used here? - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
simpleraison Posted December 3, 2010 Author Share Posted December 3, 2010 Maybe ControlGetText and StringInStr can be used here?Cheers dude how would i use it in the context i described above then dude? Link to comment Share on other sites More sharing options...
simpleraison Posted December 8, 2010 Author Share Posted December 8, 2010 Cheers dude how would i use it in the context i described above then dude?Any help on this one dude? Link to comment Share on other sites More sharing options...
fett8802 Posted December 8, 2010 Share Posted December 8, 2010 (edited) If StringInStr(ControlGetText("Window Title","",$ControlID),"Your chosen string") <> 0 Then EndIf Where $ControlID is the ID of the text field, "Window Title" is the window containing the field, and "Your chosen string" is whatever the specific string you're testing for is. If that does NOT equal 0, then proceed with script. Dude. -Fett Edited December 8, 2010 by fett8802 [sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub] Link to comment Share on other sites More sharing options...
simpleraison Posted December 9, 2010 Author Share Posted December 9, 2010 If StringInStr(ControlGetText("Window Title","",$ControlID),"Your chosen string") <> 0 Then EndIf Where $ControlID is the ID of the text field, "Window Title" is the window containing the field, and "Your chosen string" is whatever the specific string you're testing for is. If that does NOT equal 0, then proceed with script. Dude. -Fett Fett nice one dude! Just needed someone like you to pop in and help me out! That was a very clear and concise answer! 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