Jump to content

Finding button online, not using coords?


Recommended Posts

at work I use this program

http://emailx.discoveryvip.com/

I was wondering if there is a way to find the "extract" button without just using the coords since they change depending on browser and such.

thank you

Link to comment
Share on other sites

Looking at the source of their site, it looks like all they are doing is parsing the email out using this regexp:

Local $ArrayOfEmails = StringRegExp($rawText, "[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+", 3)
It should be fairly simple to have autoit do the work on this one.

Edit: Added the wrapper code for the regexp, but it's dry coded, so it might not be perfect

Edited by Fulano

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Link to comment
Share on other sites

It'd be difficult, I'm not familiar with the IE UDF (mainly as I refuse to use IE), but there might be something in there about triggering the javascript or form so you don't have to actually click the button.

Edit: Spelling kills me :mellow:

Edited by Fulano

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Link to comment
Share on other sites

hum I think i'm not explaning exactly what I'm looking for well enough.

looking at the source code for that site I found this line refering to the extract button

<INPUT name="BUTTON" type="BUTTON" class="button" onclick="findEmail()" value="Extract">

can i use this information somehow with autoit so when i load my script my mouse will go directly over the extract button?

Link to comment
Share on other sites

As I said, I'm not familiar with the Internet Explorer UDF, but IF it can trigger Javascript in the page (and it's reasonable that it would be able to), Then, yes you would be able to use that to trigger that element, either by using the function findEmail() directly, or calling document.forms["formName"].submit();

Edited by Fulano

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Link to comment
Share on other sites

It doesnt really need to trigger javascript does it? I just needs to find in the form the button for extract i thought?

I saw a post on here where someone was asking about autofilling in a login form and they explained something about looking at the source code and finding the name of the form and the field.

I'm sorry if that makes no sense I will try to find that post.

thanks

that was a lot easier to find then i thought it would be

here is the post i was referring to

http://www.autoitscript.com/forum/index.php?showtopic=111154

thanks again

Edited by rifts
Link to comment
Share on other sites

I took a look inside the IE UDF, and it looks like you can call the form directly. You do, however need to get the name & etc, or at least what number the form is. Google Chrome has an excellent source code inspector, I would suggest starting there.

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Link to comment
Share on other sites

I'm not familiar enough with the IE UDF to help out here, you'll need to do the legwork and find the documentation for it (probably in the forum). You've got the form name and the basic idea, personally I'd take another look at the post you mentioned.

Good luck :mellow:

Fulano

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

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...