AutoHotKey #
Sample script:
; remove newline characters
; Win + X
#x::
Send ^x
StringReplace, clipboard, clipboard,`r`n,, All
Send ^v
return
; google search highlighted words
^+s::
{
Send, ^c
Sleep 50
Run, http://www.google.com/search?q=%clipboard%
Return
}
; Open Downloads folder
#+d::Run "C:\Users\yunch\Downloads" ; ctrl+shift+d
return
; Open Google Drive folder
#+g::Run "C:\Users\yunch\Google Drive" ; ctrl+shift+d
return
; Open Windows Terminal
#+t::Run "C:\Users\yunch\Desktop\Windows Terminal.lnk" ; ctrl+shift+d
return
; Open MS To DO
#+i::Run "C:\Users\yunch\Desktop\Microsoft To Do.lnk" ; ctrl+shift+d
return
::btw::by the way
:*::as::中研院
- To run this script, create a shortcut: doc
- To expand Chinese characters, edit the script in
Notepad.exe
and save withUTF8 with BOM
- To run Windows app program
- go to
run.exe
- Open
shell:AppsFolder
- Find the Windows app
- Create a shortcut to Desktop and run the shortcut in ahk script
- go to
Conditional hotkey for certain app #
Right-click the AutoHotkey icon in the taskbar and select AutoHotkey’s Window Spy to find the ahk_class
of the programs you wish to manipulate.
This disables ctrl-e
for Windows Terminal:
^e::
if !WinActive("ahk_class", CASCADIA_HOSTING_WINDOW_CLASS){
send {end}
}
return