Создать пользовательский базовый URL для идентификационного номера

244
Canadian Luke

В Internet Explorer или Firefox я хотел бы иметь возможность набирать что-то короткое (т. go ###Е.) И автоматически изменять его goна полный веб-адрес префикса (например, http://go.microsoft.com/fwlink/?LinkID= ). Есть ли способ сделать это в любом браузере?

1

2 ответа на вопрос

1
SeanC

The item is called "SearchUrl"

They are saved in the registry, along with a list of translations for special characters.

An example, using your request:

Create a .reg file

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\kb] @="http://go.microsoft.com/fwlink/?LinkID=%s" ":"="%3A" 

This will register the keyword kb - the %s is the placeholder for the string you supply.
It also knows that when you type a : in the string that it should be substituted by %3A in the URL to ensure it is passed correctly.

Other common substitutions could include:

" "="+" " "="%20" "#"="%23" "&"="%26" "?"="%3F" "+"="%2B" "="="%3D" 

Note you can only have one definition for each character, so in the above list, you would have to decide if a space should be translated to %20 or +

If you wanted other shortcuts, you could add them in place of the kb, and produce a list of special shortcuts - this site has several you can choose from. (go, find and ? have special meaning, so cannot be used)

To actually use the shortcut, use the address bar (shortcut is ALT+D ) and type your text in there, e.g. kb 198279 takes you to Managing Exchange Server 2007: How to Configure Storage Quotas for a Mailbox Database

0
Dane

You could use AutoHotKey to make "go" a hotstring. You could use IfWinActive to make the hotstring only work in your browsers.

Sample code:

#IfWinActive ahk_class IEFrame ; for IE :O:go::http://go.microsoft.com/fwlink/?LinkID= ; the "O" omits the trailing space #IfWinActive ahk_class Chrome_WidgetWin_1 ; for Chrome :O:go::http://go.microsoft.com/fwlink/?LinkID= ; the "O" omits the trailing space 
Что если я хочу напечатать "goto"? Будет ли расширение просто расширяться автоматически или признавать, что оно само по себе? Canadian Luke 10 лет назад 1
AutoHotKey поддерживает любой вариант. По умолчанию ищется горячая строка, за которой следуют пробел, запятая и т. Д. Но вы также можете указать, что нужно заменить, не дожидаясь. Dane 10 лет назад 0