Jump to content

Finding a link by its href?


Recommended Posts

Here's what I have so far.. (just the basics)

#include <IE.au3>
$oIE =_IECreate("http://google.com",0,1,1)
$o_link = _IEGetObjByName($oIE,"") ; This line isn't right. How do I get the link by where it's pointing to?
_IEAction($o_link,"click")
_IELoadWait ($oIE)
_IEQuit ($oIE)
Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

That depends on the site. Just try it.

Nope. "Please use the correct gateway". (a.k.a. "I'm a paranoid freak with referrer checks on every page").

#include <IE.au3>
$oIE =_IECreate("http://infiniteadds.org",0,1,1)
$o_fid = _IEGetObjByName($oIE,"friendid")
$o_submit=_IEGetObjByName($oIE,"action")
_IEFormElementSetValue ($o_fid, "21802680")
_IEAction($o_submit,"click")
_IELoadWait ($oIE)

_IENavigate($oIE, "http://infiniteadds.org/addvip2.php?fid=21802680&addid=112997804&key=c52092001e5c5a42679d35884ac1c109")
_IELoadWait ($oIE)
Sleep(5000)
_IEQuit($oIE)
Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

Infiniteadds? What is this site anyways?

It's a site where I promote a band. With all of the promotions that I run, they get 100+ friend requests per day (which is a lot).

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

hmmm.. yes? It's not against the ToS. You can log in every 30 minutes to be added to the list of people to be added. So.. instead of doing it myself, I just make a bot to do it. I'm not cheating the system or anything. I'm just making it so that I can save time, not cheat them, you know?

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

Ok, that's fine then. I'm not really sure how to find it but I suppose you could find all anchors and look at each one until you find one that matches. Or better yet, does it have an ID?

No link ID. Could I just count links, and say to click the 47th link or something?

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

Well.. the only problem is this: I know the placement if you count from the bottom.. but not the top. haha.

The link is toward the bottom (let's pretend it's in the footer), so they won't change it.. but they'll change the content above it. Any way to count from the bottom up?

By the way, thanks for answering all of these questions for me. I'm a total noobbbbbbb. :)

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

Take a look at _IELinkGetCollection.

A small example:

$oIE = _IE_Example ("basic")
$oLinks = _IELinkGetCollection ($oIE, 0)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")

$last_link = _IELinkGetCollection($oIE, $iNumLinks - 1); -2 means 2nd last link and so on

MsgBox(0, "Last link is: ", $last_link.href)
Link to comment
Share on other sites

I actually know very little about the IE stuff. I am a software developer, a web developer, a Windows automator, but not a web automator. :o

Really? I'm just a sixteen year old kid, trying to balance school, homework, sports, work, and learning stuff on the computer.

No specialties for me. :)

Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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