AutoHotkey Community

It is currently May 27th, 2012, 10:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: June 6th, 2007, 2:50 am 
Offline

Joined: July 15th, 2006, 6:07 pm
Posts: 254
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2007, 5:39 am 
Offline

Joined: July 15th, 2006, 6:07 pm
Posts: 254
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2007, 5:50 am 
Offline

Joined: July 15th, 2006, 6:07 pm
Posts: 254
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2007, 6:45 am 
Offline

Joined: July 15th, 2006, 6:07 pm
Posts: 254
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2007, 10:37 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2007, 3:15 pm 
Offline

Joined: March 24th, 2007, 8:10 pm
Posts: 39
No need to use anything but good old HTML:
http://diveintoaccessibility.org/day_15 ... tcuts.html

_________________
Regards,
Antonio


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2007, 3:55 pm 
Accesskeys are alas underused by webmasters, this is useless if the page doesn't have them...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2007, 5:20 pm 
Offline

Joined: July 15th, 2006, 6:07 pm
Posts: 254
They are my webpages so I can add the AccessKeys to my scripts. (Obviously I'm not much of an html guru either. ;-)) Thanks for the help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 6th, 2007, 5:56 pm 
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...


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Maestr0 and 62 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group