zig05 0 Posted June 21, 2006 I am trying to get autoit to search for the location of a string within a string. My syntax won't work. It doesn't find my variable $shortaddress in the string $pagedata even when it is there. Does anybody know what I am doing wrong. (probably alot) Thanks so much for any help. $addressposition = Stringinstr($pagedata, $shortaddress, 0, 1) Share this post Link to post Share on other sites
jlorenz1 0 Posted June 21, 2006 I think we all need further information. Perhaps the variable is a number not string. Perhaps the variable isn't configured properly. Difficult to help. Greetings from Germany Johannes Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post] Share this post Link to post Share on other sites
MHz 80 Posted June 21, 2006 The last 2 parameters are optional and since you are setting them to default, then omit them. This simple example shows the position as shown in the Msgbox. $pagedata = '1234567890' ; Change to any integer in the string to test $shortaddress = '7' $addressposition = Stringinstr($pagedata, $shortaddress) ; Show result MsgBox(0, '$addressposition', $addressposition) Share this post Link to post Share on other sites
zig05 0 Posted June 21, 2006 YOU ARE THE GREATEST! It may seem like it was a retarded question, but I had tried reformatting that thing a dozen different ways. Dropping the last two parameters fixed it!!! Thanks so much! Share this post Link to post Share on other sites