| View previous topic :: View next topic |
| Author |
Message |
ottenm
Joined: 04 Apr 2008 Posts: 4
|
Posted: Fri Apr 04, 2008 5:34 pm Post subject: how to send ClickOnAHyperLink without X,Y coordinates? |
|
|
Is there a way to make an HTML control the target of a click, rather than using X,Y coordinates? I have a sequence I recorded with ASW where I need to click on a particular hyperlink, but it's X,Y location is not always identical. The target of the link is always different, but the display text is always identical.
Thanks for any help.
Mike |
|
| Back to top |
|
 |
PurloinedHeart
Joined: 04 Apr 2008 Posts: 209 Location: Canada
|
Posted: Fri Apr 04, 2008 7:25 pm Post subject: |
|
|
| Using tab to cycle through links might work. |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 666 Location: MN, USA
|
Posted: Fri Apr 04, 2008 7:35 pm Post subject: |
|
|
Download the page (UrlDownloadToFile). Parse it for the link, and Run it. Then you don't need a click.
If you search the forum for parsing HTML, there are many examples. _________________ http://autohotkey.net/~jaco0646/ |
|
| Back to top |
|
 |
ottenm
Joined: 04 Apr 2008 Posts: 4
|
Posted: Thu Apr 10, 2008 6:38 pm Post subject: |
|
|
Good suggestions, but no luck with either one.
I'm trying to automate a few step through a web app and it turns out the start page is just different enough from time to time, to thwart tabbing to the hyper link. And downloading and parsing the html is a mess because I'm paging through forms (with state variables), not just simple hyperlinks.
The labels on the links are always identical, if there were some way to navigate by control label.
Does anyone know another hotkey or scripting tool that might have something like this?
Thanks- |
|
| Back to top |
|
 |
TheIrishThug
Joined: 19 Mar 2006 Posts: 381
|
Posted: Thu Apr 10, 2008 6:40 pm Post subject: |
|
|
| You can try looking into Javescript injection. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Apr 10, 2008 10:42 pm Post subject: |
|
|
| Screen shot and Image search work |
|
| Back to top |
|
 |
ottenm
Joined: 04 Apr 2008 Posts: 4
|
Posted: Thu Apr 10, 2008 11:47 pm Post subject: |
|
|
| Quote: | | Screen shot and Image search work |
please explain? |
|
| Back to top |
|
 |
Hasso
Joined: 23 Mar 2005 Posts: 158 Location: Germany
|
Posted: Mon Apr 14, 2008 11:38 am Post subject: |
|
|
ottenm,
could you provide us with the URL of that page? I think a JavaScript solution might be the best way. _________________ Hasso
Programmers don't die, they GOSUB without RETURN |
|
| Back to top |
|
 |
Oberon
Joined: 18 Feb 2008 Posts: 453
|
Posted: Mon Apr 14, 2008 12:51 pm Post subject: |
|
|
| You can debug the JavaScript to see what's being posted and where. This way you can UrlDownloadToFile or automate with cURL. |
|
| Back to top |
|
 |
halweg
Joined: 27 Jan 2005 Posts: 103 Location: Germany, Dresden
|
Posted: Mon Apr 14, 2008 1:01 pm Post subject: |
|
|
Why not a text search? Here that works for IE6:
| Code: | #q::
SEND, ^f
SLEEP, 700
SEND, Ask for Help{ENTER}{ESC} ;*** Replace "Ask for Help" with your Link Text
SLEEP, 500
SEND, {TAB}{ENTER}
RETURN
|
(I know, WINWAIT works better, but it depends on the IE language) _________________
 |
|
| Back to top |
|
 |
ottenm
Joined: 04 Apr 2008 Posts: 4
|
Posted: Mon Apr 14, 2008 3:58 pm Post subject: |
|
|
That's awesome halweg, never thought of it but it works perfectly. I really wanted to stay out of parsing and automating the requests due to a lot of hidden/state variables in the forms. Definitely doable, but a lot of overhead in this instance.
Thanks for all the suggestions from others, extremely helpful.
Mike |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 1033
|
|
| Back to top |
|
 |
|