Jump to content
Sign in to follow this  
rifts

Finding button online, not using coords?

Recommended Posts

rifts

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

Share this post


Link to post
Share on other sites
Fulano

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!

Share this post


Link to post
Share on other sites
rifts

yeah I understand what you mean, but my question is regarding if it is possible for an autoit script to locate the "extract" button without first manually finding the coordinates.

Share this post


Link to post
Share on other sites
Fulano

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!

Share this post


Link to post
Share on other sites
rifts

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?

Share this post


Link to post
Share on other sites
Fulano

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!

Share this post


Link to post
Share on other sites
rifts

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

Share this post


Link to post
Share on other sites
Fulano

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!

Share this post


Link to post
Share on other sites
rifts

I dont know much about UDF

but I did find <FORM name="extractor"> and <INPUT name="BUTTON" type="BUTTON" class="button" onclick="findEmail()" value="Extract">

Share this post


Link to post
Share on other sites
Fulano

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!

Share this post


Link to post
Share on other sites
rifts

Thanks Fulano,

I appreciate all the help and patience!

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.