0% found this document useful (0 votes)
216 views

AHK Shortcuts

This document contains AutoHotkey script code for keyboard shortcuts and macros. It defines hotkeys for tasks like navigating notes, translating text, searching online and locally, resizing windows, and more. Hotkeys are mapped to send key combinations or run applications and URLs for quick access to common functions. Conditionals are used to only trigger certain actions when specific window titles are active.

Uploaded by

Arron Marshall
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
216 views

AHK Shortcuts

This document contains AutoHotkey script code for keyboard shortcuts and macros. It defines hotkeys for tasks like navigating notes, translating text, searching online and locally, resizing windows, and more. Hotkeys are mapped to send key combinations or run applications and URLs for quick access to common functions. Conditionals are used to only trigger certain actions when specific window titles are active.

Uploaded by

Arron Marshall
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

#InstallKeybdHook

#Persistent
#HotkeyInterval,100
SetKeyDelay, -1
ResizeWin(Width = 0, Height = 0, Move1 = 0, Move2 = 0)
{
WinGetPos, X, Y, W, H, A
WinMove,a,,%Move1%,%Move2%,%Width%,%Height%
}
#n::
IfWinExist ahk_class TfMain
{ WinActivate
IfWinActive Untitled - Caderno
Return
else
Send, ^t
}
else
Run note
return
^e::
{
Send, ^{End}
Send, {Down}
Send, {Home}
}
Return
#t::
{
Send, ^c
IfWinNotExist, Google Translate
{
Run, "C:\Documents and Settings\amarshall\Local Settings\Applica
tion Data\Google\Chrome\Application\chrome.exe" --app="http://translate.google.c
om/?sl=auto#"
}
Else
{
WinActivate, Google Translate
}
WinWaitActive, Google Translate
Send, ^a
Send, ^v
}
Return
MButton::
CoordMode, Mouse, Screen
MouseGetPos, Xpos, Ypos
{
If (Xpos >= 60) && (Xpos <= 1445) && (Ypos >= 1024) && (Ypos <= 1049)
{
WinActivate, ahk_class Shell_TrayWnd
Click %Xpos%, %Ypos%
Sleep 5
IfWinActive, ahk_class Shell_TrayWnd
{
Sleep 500
KeyWait, MButton, D
MouseGetPos, Xpos, Ypos
Click %Xpos%, %Ypos%
Sleep 5
}
WinGetActiveTitle, CloseWin
;WinClose, %CloseWin%
PostMessage, 0x112, 0xF060,,, %CloseWin%, ; 0x112 = WM_SYSCOMMAND, 0x
F060 = SC_CLOSE
}
Else
{
Send {MButton}
}
}
Return
#c::
IfWinExist Calculator
WinActivate
Else
Run Calc
Return
#s::
{
Gui, Add, Edit, vSearch x12 y100 w178 h20
Gui, Add, Text, x12 y10 w100 h20 , Search Where?
Gui, Add, CheckBox, vGoogle x12 y30 w80 h20 , &Google
Gui, Add, CheckBox, vYouTube x100 y30 w80 h20 , &YouTube
Gui, Add, CheckBox, vDictionary x12 y50 w80 h20 -Wrap , &Dictionary
Gui, Add, CheckBox, vThesaurus x100 y50 w85 h20 -Wrap , &Thesaurus
Gui, Add, CheckBox, vMyComputer x12 y70 w178 h20 -Wrap , &My Computer
Gui, Add, Button,Default x12 y130 w178 h30 , Search
Gui, Show, W200 , Search
Return
GuiClose:
Gui, Submit
Gui, Destroy
GuiEscape:
Gui, Submit
Gui, Destroy
ButtonSearch:
Gui, Submit
If (Google = 1)
{
Sleep 50
Run, http://www.google.com/search?q=%Search%
}
If (YouTube = 1)
{
Sleep 50
Run, http://www.youtube.com/results?search_query=%Search%
}
If (Dictionary = 1)
{
Sleep 50
Run, http://dictionary.reference.com/browse/%Search%
}
If (Thesaurus = 1)
{
Sleep 50
Run, http://thesaurus.reference.com/browse/%Search%
}
If (MyCOmputer = 1)
{
Sleep 50
Run, search`-ms`:displayname`=Ultimate`%20Search`%20Results`&crumb=Syste
m`.Generic`.String`%3A%Search%`&crumb`=location`:`%3A`%3A`{20D04FE0`-3AEA`-1069`
-A2D8`-08002B30309D`}
}
Gui, Destroy
Return
}
#IfWinActive ahk_class XLMAIN
{
^!UP::
Send, !h
Send, fg
Return
^!DOWN::
Send, !h
Send, fk
Return
#IfWinActive
}
#IfWinActive Writeboard:
{
^b::
Send, ^c
Send, *^v*
Return
^Tab::
{
Send, p(.
}
Return
#IfWinActive
}
#IfWinActive ahk_class OpusApp
{
^!UP::
Send, !h
Send, fg
Return
^!DOWN::
Send, !h
Send, fk
Return
#IfWinActive
}
^!t:: Winset, AlwaysOnTop, , A
^#LEFT::
{
SWidth := (A_ScreenWidth / 2)
SHeight := (A_ScreenHeight - 30)
Move := 0
ResizeWin(SWidth, SHeight, Move)
}
Return
^#RIGHT::
{
SWidth := (A_ScreenWidth / 2)
SHeight := (A_ScreenHeight - 30)
ResizeWin(SWidth, SHeight, SWidth)
}
Return
^#DOWN::
{
SWidth := (A_ScreenWidth)
SHeight := ((A_ScreenHeight - 30) / 2)
ResizeWin(SWidth, SHeight,,SHeight)
}
Return
^#UP::
{
SWidth := (A_ScreenWidth)
SHeight := ((A_ScreenHeight - 30) / 2)
/Hide
/Hide
ResizeWin(SWidth, SHeight)
}
Return
^#f::
{
SWidth := A_ScreenWidth
SHeight := A_ScreenHeight
WinRestore, A
WinMaximize, A
}
#ifWinActive ahk_class TwelveSky2
{
^#UP::
^#RIGHT::
^#LEFT::
^#DOWN::
Return
#IfWinActive
}

You might also like