AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hotkeys and website navigation

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
wakewatcher



Joined: 15 Jul 2006
Posts: 139

PostPosted: Wed Jun 06, 2007 2:50 am    Post subject: Hotkeys and website navigation Reply with quote

I need to generate hotkeys to navigate consistent websites. That is I have websites that have links to "previous", "next" and "back to index." Is there a simple way to map keys to make these transitions? (I can modify the html if that helps.)

Thanks
Back to top
View user's profile Send private message
wakewatcher



Joined: 15 Jul 2006
Posts: 139

PostPosted: Wed Jun 06, 2007 5:39 am    Post subject: Reply with quote

Some additional notes. The web browser will always be firefox. The page always only has those three links. If I could set the focus somehow I could count tabs to get there but haven't figured out how to set the focus. I've been reading up on the javascript approach but so far haven't fully groked it.
Back to top
View user's profile Send private message
wakewatcher



Joined: 15 Jul 2006
Posts: 139

PostPosted: Wed Jun 06, 2007 5:50 am    Post subject: Reply with quote

I'm getting close. I found by pasting:
Code:
javascript:document.links[2].focus();

into the address bar I can get to the links I need. (Thanks n-l-i-d from 11/29/06 post) Now I've got to figure out how to use ControlSetText with the FF address bar. I think I'm close.
Back to top
View user's profile Send private message
wakewatcher



Joined: 15 Jul 2006
Posts: 139

PostPosted: Wed Jun 06, 2007 6:45 am    Post subject: Reply with quote

Well not as close as I thought. I can't seem to get FF to 'take' the new control text. From Window Spy I got MozillaWindowClass1 as the control so figure something like this should work:

Code:
SetTitleMatchMode, 2
.
.
ControlSetText,MozillaWindowClass1,javascript:document.links[1].focus()`;,Mozilla

However no joy. When I try using IE and Edit2 as the control it works. Is there something special that FF needs?
Back to top
View user's profile Send private message
Helpy
Guest





PostPosted: Wed Jun 06, 2007 10:37 am    Post subject: Reply with quote

Firefox windows are opaque, it doesn't use standard Windows control, so you have two options:
- Use a shortcut key like Ctrl+L to go to the address bar, then send the JS;
- Use the Link Widgets extension, it is very handy to navigate such site.
Back to top
atnbueno



Joined: 24 Mar 2007
Posts: 26

PostPosted: Wed Jun 06, 2007 3:15 pm    Post subject: Reply with quote

No need to use anything but good old HTML:
http://diveintoaccessibility.org/day_15_defining_keyboard_shortcuts.html
_________________
Regards,
Antonio
Back to top
View user's profile Send private message Visit poster's website
Helpy
Guest





PostPosted: Wed Jun 06, 2007 3:55 pm    Post subject: Reply with quote

Accesskeys are alas underused by webmasters, this is useless if the page doesn't have them...
Back to top
wakewatcher



Joined: 15 Jul 2006
Posts: 139

PostPosted: Wed Jun 06, 2007 5:20 pm    Post subject: Reply with quote

They are my webpages so I can add the AccessKeys to my scripts. (Obviously I'm not much of an html guru either. Wink) Thanks for the help.
Back to top
View user's profile Send private message
Helpy
Guest





PostPosted: Wed Jun 06, 2007 5:56 pm    Post subject: Reply with quote

Ah, I missed the part where you indicate you can modify the pages!
Sorry.
Good think, it is nice for other users as well.
Don't forget the link metadata too...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group