darkyr Posted October 16, 2011 Share Posted October 16, 2011 <tbody> <tr> <td><input type="checkbox" name="emailTable:0:j_id29" checked="checked" disabled="disabled" /></td> <td> user@yahoo.com</td> <td><a href="/linktoit/index.html?dataModelSelection=message%3Aemails%5B0%5D&actionMethod=index.xhtml%3AmailQueue.select" id="emailTable:0:j_id35">Confirmation code: oO6aI2Nq5m</a></td> <td> </td> <td> Oct 16, 2011 10:51:08 AM</td> </tr> </tbody> </table> I am trying to make a function that will get this and return it /linktoit/index.html?dataModelSelection=message%3Aemails%5B0%5D&actionMethod=index.xhtml%3AmailQueue.select I have tried this function but it doesn't work I know it doesn't do what I want but I was taking baby steps and still couldn't figure it out, any help would be greatly appreciated. Thanks Func GetEmail() $page = _INetGetSource('http://workcomputer.com/mail/') $pageArray = StringSplit($page, @CRLF) For $i = 1 To $pageArray[0] If StringInStr($pageArray[$i], "user@yahoo.com") Then MsgBox(0, "Found it", $pageArray[$i]) Next EndFunc Link to comment Share on other sites More sharing options...
JohnOne Posted October 16, 2011 Share Posted October 16, 2011 Lets take them baby steps now. Define "it doesn't work" better than that. 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...
darkyr Posted October 16, 2011 Author Share Posted October 16, 2011 the function I posted does not find the user@yahoo.com in the source Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 16, 2011 Share Posted October 16, 2011 Try using the _StringBetween() function, maybe like this..#include <String.au3> $a = "<a href='/linktoit/index.html?dataModelSelection=message%3Aemails%5B0%5D&actionMethod=index.xhtml%3AmailQueue.select' id='emailTable:0:j_id35'>Confirmation code: oO6aI2Nq5m</a>" $b = _StringBetween($a, "<a href='", "' id='") MsgBox(0, "", $b[0]) darkyr 1 - 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...
JohnOne Posted October 16, 2011 Share Posted October 16, 2011 (edited) the function I posted does not find the user@yahoo.com in the source I can find it perfectly fine, there are a few functions in your function, which one is not returning a value you expect? Edited October 16, 2011 by JohnOne 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...
darkyr Posted October 17, 2011 Author Share Posted October 17, 2011 $page=_INetGetSource("http://pagelink") $pageArray = StringSplit($page, @CRLF) For $i = 1 To $pageArray[0] If StringInStr($pageArray[$i], "Confirmation code:") Then MsgBox(0, "Found it", $pageArray[$i]) $b = _StringBetween($pageArray[$i], "Confirmation code: ", "</a>") MsgBox(0, "Found it", $b[0]) EndIf Next this piece of code works for anybody that will be trying to do this in the future, thank you all Klexur 1 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