Jump to content

Recommended Posts

Posted

<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&amp;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&amp;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
Posted

Try using the _StringBetween() function, maybe like this..

#include <String.au3>
$a = "<a href='/linktoit/index.html?dataModelSelection=message%3Aemails%5B0%5D&amp;actionMethod=index.xhtml%3AmailQueue.select' id='emailTable:0:j_id35'>Confirmation code: oO6aI2Nq5m</a>"
$b  = _StringBetween($a, "<a href='", "' id='")
MsgBox(0, "", $b[0])

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Posted

$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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...