rifts Posted March 9, 2010 Share Posted March 9, 2010 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 More sharing options...
Fulano Posted March 9, 2010 Share Posted March 9, 2010 (edited) 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 March 9, 2010 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 More sharing options...
rifts Posted March 9, 2010 Author Share Posted March 9, 2010 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. Link to comment Share on other sites More sharing options...
Fulano Posted March 9, 2010 Share Posted March 9, 2010 (edited) 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 Edited March 9, 2010 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 More sharing options...
rifts Posted March 9, 2010 Author Share Posted March 9, 2010 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 More sharing options...
Fulano Posted March 9, 2010 Share Posted March 9, 2010 (edited) 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 March 9, 2010 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 More sharing options...
rifts Posted March 9, 2010 Author Share Posted March 9, 2010 (edited) 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 March 9, 2010 by rifts Link to comment Share on other sites More sharing options...
Fulano Posted March 9, 2010 Share Posted March 9, 2010 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 More sharing options...
rifts Posted March 9, 2010 Author Share Posted March 9, 2010 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"> Link to comment Share on other sites More sharing options...
Fulano Posted March 9, 2010 Share Posted March 9, 2010 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 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 More sharing options...
rifts Posted March 9, 2010 Author Share Posted March 9, 2010 Thanks Fulano, I appreciate all the help and patience! 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