Keyboard Ninja: Assign a Hotkey to any Window Keyboard Ninja: Določi Hotkey za vsako okno
When I need to perform a repetitive task such as checking my email or switching to an open IM window, the quickest option is to assign a hotkey directly to the window, so I can toggle the window minimized/restored with nothing more than a single keystroke. Ko moram opravljati ponavljajoče se naloge, kot je preverjanje svoj email ali prehoda na odprto okno IM, najhitrejši možnost dodeliti hotkey neposredno na okno, da bom lahko zatik skrajnost zmanjšati okno / obnoviti z nič več kot eno keystroke .
How did I accomplish this? Kako sem izpolnjevanje le-tega? AutoHotkey AutoHotKey , a small scripting framework that allows you to automate anything in Windows. , Majhen scripting okvir, ki vam omogoča avtomatizacijo kaj v operacijskem sistemu Windows. Before we begin, I'm going to assume that you've downloaded and installed it. Preden začnemo, bom za domnevo, da ste prenesli in namestili.
I've created a small function that you can add to a script which will do the hard work of finding and toggling the window. Naredil sem majhno funkcijo, ki jo lahko dodate skript, ki bo to težko delo pri iskanju in toggling okno. All you have to do is assign the hotkeys you want at the top of the script. Vse kar morate storiti je, dodeliti hotkeys želite na vrhu scenarij. 
The first thing you will need to do is Prva stvar, ki jo bo treba storiti, je download the script download skripta and save it somewhere useful. in jo shranite nekje koristno. You should be able to simply double-click on the script to start it, and then you will notice a new tray icon (The green one with the H) Moral bi imeti možnost, da preprosto dvokliknite na scenarij začeti, nato pa boste opazili nov ikona pladenj (zeleno z H)

Right-click on the icon, and choose Edit This Script from the menu. Z desnim klikom na ikono in izberite Edit Ta skripta iz menija. You'll have to add in your own hotkeys since none are defined in the script, so let's go take a look at the script… Boste morali dodati v svoj hotkeys, saj se nikomur ne bi opredeljena v skript, tako da gremo lahko gledati scenarij ...
; —————————————————————– ; ----------------------
; Declare Your hotkeys in this section ; Ugotovi Vaš hotkeys v tem oddelku
; —————————————————————– ; ----------------------
; —- these are samples —- - So vzorci --
; !j::ToggleWindow(”- Mozilla Firefox”) – Win + J ;! J:: ToggleWindow ( "- Mozilla Firefox") - Win + J
; #c::ToggleWindow(”SecureCRT”) – Win + C , # C:: ToggleWindow ( "SecureCRT") - Win + C
; !x::ToggleWindow(”cmd.exe”) – Alt + X ;! X:: ToggleWindow ( "cmd.exe") - Alt + X; —————————————————————– ; ----------------------
; Function for toggling windows - Do not edit ; Se ne Funkcija za toggling okno - Do uredi
; —————————————————————– ; ----------------------
ToggleWindow(TheWindowTitle) ToggleWindow (TheWindowTitle)
{ (
SetTitleMatchMode,2 SetTitleMatchMode, 2
DetectHiddenWindows, Off DetectHiddenWindows, Off
IfWinActive, %TheWindowTitle% IfWinActive,% TheWindowTitle%
{ (
WinMinimize, %TheWindowTitle% WinMinimize,% TheWindowTitle%
} )
Else Še
{ (
IfWinExist, %TheWindowTitle% IfWinExist,% TheWindowTitle%
WinActivate WinActivate
Else Še
{ (
DetectHiddenWindows, On DetectHiddenWindows, On
IfWinExist, %TheWindowTitle% IfWinExist,% TheWindowTitle%
{ (
WinShow WinShow
WinActivate WinActivate
} )
} )
} )
} )
It might be a little complicated for some of you, but the only thing we need to do is add in some hotkey lines. Mogoče je malo bolj kompliciran za nekatere od vas, ampak le stvar, ki jo morate storiti, je dodajanje na nekaj vrstic hotkey. You'll notice that there are a number of sample hotkey lines defined already, but commented out. Opazili boste, da je število vrstic vzorca hotkey opredeljena že, toda pripomnil ven.
Hotkeys are defined in this format: Hotkeys so opredeljene v tem formatu:
<keys>::ToggleWindow(”Partial Window Title String”) <keys>:: ToggleWindow ( "Delno okno Naslov String")
For special keys, you'll use one of the following, which can be combined. Za posebne tipke, boste uporabljali enega od naslednjih, ki jih je mogoče kombinirati. (get more information at (dobite več informacij na Autohotkey AutoHotKey documentation) dokumentacija)
| # # | Windows key Windows tipko |
| ! ! | Alt Alt |
| ^ ^ | Control Control |
| + + | Shift Izmena |
| < < | Use Left key (for instance <! means left Alt key only) Uporaba Leva tipka (na primer <! Pomeni levo Alt tipko le) |
| > > | Use Right key (for instance >! means right Alt key only) Uporabi desno tipko (na primer>! Pomeni desno tipko Alt only) |
So for instance, if you wanted to trigger the keyboard shortcut of Ctrl+Alt+F and assign it to Firefox, you would use the following: Torej za primer, če si hotel, da sproži bližnjico na tipkovnici Ctrl + Alt + F in dodeli za Firefox, bi lahko uporabite naslednje:
^!f::ToggleWindow(”- Mozilla Firefox”) ^! f:: ToggleWindow ( "- Mozilla Firefox")
Personally, I try to use keyboard shortcuts that don't require me to lift my hands off the keys. Osebno, jaz začeti uporabljati bližnjic na tipkovnici, ki ne zahtevajo me, da odpravi moje roke z ključi. I simply use Alt+J assigned to Firefox because I can hit that combination without moving my hands at all. Jaz preprosto uporabite Alt + J, dodeljene Firefox, saj lahko sem udaril to kombinacijo brez premikanja roke sploh.
When you are done editing the script, just save it and then go up to the H icon again, and choose the “Reload This Script” option, which will load all of your changes. Ko ste končali urejanje skript, samo shranite, nato pa pojdite do ikono H znova, in izberite "Reload Ta Script" možnost, ki bo obremenitev vse vaše spremembe. If there was a problem, you'll get an error message, and you can always use Exit to stop the script entirely. Če je problem, boste prejeli sporočilo o napaki, pa lahko vedno uporabite Izhod ustaviti skript v celoti.

You'll have to decide which key combinations work best for you. Boste morali odločiti, katere ključne kombinacije deluje najbolje za vas. My advice is to add one or two at a time, and get used to using them. Moj nasvet je, da dodate eno ali dve naenkrat, in se uporabljajo za njihovo uporabo. Within a few days you'll wonder how you ever lived without them. V nekaj dneh se boste spraševali, kako ste kdaj živeli brez njih. You should also read up on AutoHotkey as well… it can do much more than just this. Preberite tudi više AutoHotKey tudi ... lahko naredi veliko več kot le to.
Note: The function ToggleWindowHide function in the script is for the more adventurous – it will toggle the window between hidden and restored… extremely useful for command prompt windows. Opomba: Funkcija ToggleWindowHide funkcije v scenarij, je za bolj avanturistične - to pa vklopite okno med sivo in obnovljena ... zelo koristne za zapoved uren okno. Essentially gives me Tilda or YaKuake on Windows. V bistvu mi daje Tilda ali YaKuake na Windows.
Download geek_autohotkey.ahk (Autohotkey script) Download geek_autohotkey.ahk (AutoHotKey script)

Daily Email Updates Dnevni Email Updates
You can get our how-to articles in your inbox each day for free. Lahko dobite našo kako do člankov v vašo mapo »Prejeto vsak dan brezplačno. Just enter your name and email below: Preprosto vpišite vaše ime in e-pošto spodaj:



Thanks for this, its an awesome utility! Hvala za to, njeno uporabnost awesome!
If you don't mind I'll write some of my scripts: Če vas ne moti, bom napisala nekaj mojih skripte:
#IfWinActive ahk_class CabinetWClass # IfWinActive ahk_class CabinetWClass
MButton::Send {backspace} MButton:: Pošljite) (vračalka
This one checks if the active window is an explorer window and assigns middle click to have the same function as backspace, going to the parent folder, pretty useful for all-mouse browsing. Ta je pregledov, če aktivno okno raziskovalec okno ter dodeli srednji kliknite, da imajo enako funkcijo kot vračalko, bo nadrejeno mapo, zal koristen za vse-miš brskanje.
I also have some programing functions (for PHP and Flash), for example: Imam tudi nekaj programing funkcije (za PHP in Flash), na primer:
::_if:: :: _if::
Send if () {{}{}}{Left 4} Pošlji if () {{}{}}{ Left 4)
return donos
If I type “_if” the program will replace that by “if () {}” and will place the typing cursor between the “()” (moving the cursor 4 times to the left) , allowing me to continue coding right away. Če bom tipa "_if" program, ki nadomesti s "if (), bo ()" Kraj in tipkanje kazalec med "()" (premikanje kurzorja 4-krat v levo), kar mi da še naprej kodiranja takoj. I also use this for my mail (using Jaz tudi raba to v svoj verižna srajca (z uporabo _@). _ @).
Again, thank you for showing me this little beauty Še enkrat, hvala zakaj kazanje mi to malo lepote
The first sample in the screenshot ( ! j ) …. Prvi vzorec v screenshot (! J) .... that should be Alt + J da bi bilo treba Alt + J