Keyboard Ninja: Assign a Hotkey to any Window Keyboard Ninja: Magtalaga ng isang Hotkey sa anumang Window
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. Kapag kailangan ko upang magsagawa ng paulit-ulit gawain tulad ng paglagay ng tsek ang aking email o lumilipat sa isang bukas na IM window, ang pinakamabilis na opsyon ay upang magtalaga ng isang hotkey direkta sa window, kaya ako magpalipat-lipat ng window mababawasan / ibalik sa wala ng higit sa isang solong keystroke .
How did I accomplish this? Paano ko tuparin ito? AutoHotkey AutoHotkey , a small scripting framework that allows you to automate anything in Windows. , Isang maliit scripting balangkas na nagbibigay-daan sa iyo upang automate kahit ano sa Windows. Before we begin, I'm going to assume that you've downloaded and installed it. Bago magsimula namin, ako pagpunta sa ipinapalagay na ang ka-download at i-install ito.
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. Ako'y gumawa ng isang maliit na function na maaari mong idagdag sa isang script na kung saan ay gawin ang mga hirap sa trabaho ng paghahanap at toggling ang window. All you have to do is assign the hotkeys you want at the top of the script. Lahat ng kailangan mong gawin ay magtalaga ng hotkeys gusto mo sa tuktok ng script. 
The first thing you will need to do is Ang unang bagay na kailangan mong gawin ay download the script i-download ang script and save it somewhere useful. at i-save ito sa tabi-tabi kapaki-pakinabang. 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) Ikaw ay dapat ma-i-double click sa script sa simula nito, at pagkatapos ay mapapansin mo ang isang bagong icon sa tray (Ang berde ang isa sa mga H)

Right-click on the icon, and choose Edit This Script from the menu. Right-click sa icon, at piliin ang I-edit ang Script na ito mula sa menu. 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… Kailangan ninyong idagdag sa iyong sariling hotkeys since wala ay tinukoy sa script, kaya let's go tingnan ang script ...
; —————————————————————– ; ----------------------
; Declare Your hotkeys in this section ; Magpahayag ng iyong hotkeys sa section na ito
; —————————————————————– ; ----------------------
; —- these are samples —- ; - Ang mga ito ay mga halimbawa --
; !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 ; Function para sa toggling bintana - Huwag i-edit
; —————————————————————– ; ----------------------
ToggleWindow(TheWindowTitle) ToggleWindow (TheWindowTitle)
{ (
SetTitleMatchMode,2 SetTitleMatchMode, 2
DetectHiddenWindows, Off DetectHiddenWindows, Off
IfWinActive, %TheWindowTitle% IfWinActive,% TheWindowTitle%
{ (
WinMinimize, %TheWindowTitle% WinMinimize,% TheWindowTitle%
} )
Else Kung hindi
{ (
IfWinExist, %TheWindowTitle% IfWinExist,% TheWindowTitle%
WinActivate WinActivate
Else Kung hindi
{ (
DetectHiddenWindows, On DetectHiddenWindows, Sa
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. Ito ay maaaring maging isang maliit na kumplikado para sa ilan sa inyo, ngunit ang tanging bagay na kailangan naming gawin ay magdagdag sa ilang mga hotkey linya. You'll notice that there are a number of sample hotkey lines defined already, but commented out. Mapapansin mo na may isang bilang ng mga linya ng sample hotkey tinukoy na, ngunit commented out.
Hotkeys are defined in this format: Hotkeys ay tinukoy sa format na ito:
<keys>::ToggleWindow(”Partial Window Title String”) <keys>:: ToggleWindow ( "Bahagyang Window Title String")
For special keys, you'll use one of the following, which can be combined. Para sa mga espesyal na key, makikita mo gamitin ang isa sa mga sumusunod, na kung saan maaring maisama. (get more information at (makakuha ng karagdagang impormasyon sa Autohotkey Autohotkey documentation) babasahin)
| # # | Windows key Windows susi |
| ! ! | Alt Alt |
| ^ ^ | Control Control |
| + + | Shift Lumipat |
| < < | Use Left key (for instance <! means left Alt key only) Gamitin ang Kaliwa key (halimbawa <! Nangangahulugan kaliwa Alt susi lamang) |
| > > | Use Right key (for instance >! means right Alt key only) Gamitin ang right key (halimbawa>! Nangangahulugan karapatan Alt susi lamang) |
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: Kaya halimbawa, kung nais mo upang ma-trigger ang keyboard shortcut ng Ctrl + Alt + F at italaga ito sa Firefox, nais mong gamitin ang mga sumusunod:
^!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. Na personal, subukan ko na gumamit ng mga shortcut sa keyboard na hindi nangangailangan ng ako sa pag-angat ng aking mga kamay off ang mga pindutan. I simply use Alt+J assigned to Firefox because I can hit that combination without moving my hands at all. Ako lang gumamit ng Alt + J itinalaga sa Firefox dahil hit ko na ang kombinasyon nang hindi gumagalaw ang aking mga kamay sa lahat.
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. Kapag kayo ay tapos na ang pag-edit ng script, i-save ito at pagkatapos ay pumunta hanggang sa ang icon H muli, at piliin ang "I-reload Ang opsyon na ito Script", na kung saan ay load ang lahat ng iyong mga pagbabago. If there was a problem, you'll get an error message, and you can always use Exit to stop the script entirely. Kung may problema, makakakuha ka ng isang error na mensahe, at maaari mong gamitin ang laging Lumabas upang itigil ang script ng lahat.

You'll have to decide which key combinations work best for you. Kailangan ninyong magdesisyon kung aling mga kumbinasyon key pinakamahusay na gumagana para sa iyo. My advice is to add one or two at a time, and get used to using them. Ang aking payo ay idagdag ang isa o dalawa sa isang panahon, at masanay sa paggamit sa mga ito. Within a few days you'll wonder how you ever lived without them. Sa loob ng ilang araw kayo magtaka kung gaano na ba nang walang nakatira sa kanila. You should also read up on AutoHotkey as well… it can do much more than just this. Dapat mo ring basahin hanggang sa AutoHotkey pati na rin ... ito ang higit pa lamang ito.
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. Tandaan: Ang function ToggleWindowHide function sa script na ito ay para sa mas mahilig - ito ang magpalipat-lipat sa pagitan ng mga bintana nakatago at ibalik ... lubhang kapaki-pakinabang para sa command prompt windows. Essentially gives me Tilda or YaKuake on Windows. Mahalagang nagbibigay sa akin Tilda o YaKuake sa Windows.

Daily Email Updates Araw-araw na Updates Email
You can get our how-to articles in your inbox each day for free. Maaari kang makakuha ng aming kung-paano na mga artikulo sa iyong inbox sa bawat araw para sa libre. Just enter your name and email below: Ilagay lamang ang inyong pangalan at email sa ibaba:



Thanks for this, its an awesome utility! Salamat para sa mga ito, ang isang utility awesome!
If you don't mind I'll write some of my scripts: Kung hindi mo isip kukunin ko na isulat ang ilan sa aking mga script:
#IfWinActive ahk_class CabinetWClass # IfWinActive ahk_class CabinetWClass
MButton::Send {backspace} MButton:: Ipadala (backspace)
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. Ito ay isa sa mga tseke kung ang aktibong window ay isang explorer window at nagtatalaga ng gitnang i-click ang magkaroon ng parehong function bilang backspace, pagpunta sa folder ng magulang, medyo kapaki-pakinabang para sa lahat ng mouse-browse.
I also have some programing functions (for PHP and Flash), for example: Ako ay mayroon ding ilang mga programing function (para sa PHP at Flash), halimbawa:
::_if:: :: _if::
Send if () {{}{}}{Left 4} Magpadala ng kung () {{}{}}{ Kaliwa 4)
return bumalik
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. Kung ako type "_if" program ay palitan na sa pamamagitan ng "kung () ()" at ilagay ang pag-type ng cursor sa pagitan ng "()" (gumagalaw ang cursor 4 na beses sa kaliwa), na nagpapahintulot sa akin upang magpatuloy coding kaagad. I also use this for my mail (using Ako din gamitin ito para sa aking mail (gamit _@). _ @).
Again, thank you for showing me this little beauty Muli, salamat sa pagpapakita sa akin ang maliit na kagandahan
The first sample in the screenshot ( ! j ) …. Ang unang sample sa screenshot (! J) .... that should be Alt + J na dapat ay Alt + J