Você está na página 1de 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
}

Você também pode gostar