 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
mpcluever
Joined: 23 Feb 2006 Posts: 22
|
Posted: Thu Feb 23, 2006 4:25 pm Post subject: How to get a mouse click on specific text in a website |
|
|
I am wonderinng how to get it to click on specific text in a website. I've had it working great by just using position, but recently they have been changing things around so stuff is always just a hair off. It would be nice if i could get it to recognize the link i need. This is what i have right now:
| Code: | WinWait, Guest Trac - BK® Gateway - Microsoft Internet Explorer, Links
IfWinNotActive, Guest Trac - BK® Gateway - Microsoft Internet Explorer, Links, WinActivate, Guest Trac - BK® Gateway - Microsoft Internet Explorer, Links
WinWaitActive, Guest Trac - BK® Gateway - Microsoft Internet Explorer, Links
StatusBarWait, Menu ready for use
Sleep, 3000
MouseMove, 252, 234
MouseMove, 290, 255
MouseMove, 398, 260
MouseClick, left, 583, 348
MouseMove, 0, 0
StatusBarWait, Menu ready for use
MouseClick, left, 758, 357
MouseMove, 0, 0
WinWaitActive, https://bkguesttrac.whopper.com/reports/
WinActivate
StatusBarWait, Done
Sleep, 2000
MouseClick, left, 34, 199
MouseMove, 0, 0 |
Thanks for any help!! _________________ Matt P Cluever |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Thu Feb 23, 2006 4:35 pm Post subject: |
|
|
Do you know that sending {Tab} to Internet Explorer (or Firefox) allows you to navigate from link to link? (or to next form control)
You can click near the target link to go faster.
And send {Enter} to activate the link. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
mpcluever
Joined: 23 Feb 2006 Posts: 22
|
Posted: Thu Feb 23, 2006 4:57 pm Post subject: |
|
|
lol. didn't even think of that. that wil be PERFECT!! thanks! _________________ Matt P Cluever |
|
| Back to top |
|
 |
Greg
Joined: 22 Dec 2005 Posts: 246
|
Posted: Thu Feb 23, 2006 6:12 pm Post subject: |
|
|
| Assuming the urls aren't changing, why not just Run the desired link? You won't need to worry about the position changing, or any race issues from ill-timed key sending. |
|
| Back to top |
|
 |
mpcluever
Joined: 23 Feb 2006 Posts: 22
|
Posted: Thu Feb 23, 2006 6:22 pm Post subject: |
|
|
the link runs a report and it has to be clicked on. i tried the earlier reply about using tab and that works for most of my problem, but the main part is still a problem. Tab only selects the box that this group of links is in. As far as going to the link directly, it is a pretty secure site. all attempts at inner sites are redirected to the initial log in. _________________ Matt P Cluever |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Fri Feb 24, 2006 11:46 am Post subject: |
|
|
| mpcluever wrote: | | the link runs a report and it has to be clicked on. |
Yes, I suspected that, hence my suggestion.
A lot of Web forms can be more or less emulated (filling hidden (or not) fields, using JavaScript to submit the form), but it is more work.
And if the site is checking the referer, it is even harder...
| mpcluever wrote: | | i tried the earlier reply about using tab and that works for most of my problem, but the main part is still a problem. Tab only selects the box that this group of links is in. |
Ah? What browser are you using? If you tab again, does it goes past this group? Have you tried to tab more? A Web page can specify the tab order, so perhaps you links are farther.
If that's not too much confidential, an extract of the relevant part of the source code of the page may help. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
LaMpiR
Joined: 15 May 2008 Posts: 12
|
Posted: Fri May 16, 2008 10:42 pm Post subject: |
|
|
| DId you solve this problem? I need similar script as well. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|