Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ;Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ;Enable warnings to assist with detecting common errors.
- SendMode Input ;Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ;Ensures a consistent starting directory.
- menu, tray, icon, %A_ScriptDir%\Icons\input_keyboard.ico ;Determina o ícone da system tray com o script ativado.
- ;Teclas de atalho
- Launch_App2:: SpeedCrunch() ;Calc
- ^Launch_App2:: Calculator() ;Ctrl + Calc
- !Launch_App2:: altHP() ;Alt + Calc
- ^Media_Play_Pause:: Aimp() ;Ctrl + Play/Pause
- ^!+Esc:: ProcessExplorer() ;Ctrl + Alt + Shift + Esc
- AppsKey:: Cmder() ;Context Menu
- ^AppsKey:: Cmd() ;Ctrl + Context Menu
- <^>!AppsKey:: WindowsTerminal() ;AltGr + Context Menu
- ^<#E:: MultiCommander() ;Ctrl + Super + E
- !PrintScreen:: Lightshot() ;Alt + Print Screen
- ;Desabilita combinações de teclas com calculadora para evitar "flood" de calculadoras abertas.
- +Launch_App2:: Return ;Shift + Calc
- #Launch_App2:: Return ;Super + Calc
- +^Launch_App2:: Return ;Shift + Ctrl + Calc
- +#Launch_App2:: Return ;Shift + Super + Calc
- +!Launch_App2:: Return ;Shift + Alt + Calc
- ^#Launch_App2:: Return ;Ctrl + Super + Calc
- ^!Launch_App2:: Return ;Ctrl + Alt + Calc (AltGr + Calc)
- #!Launch_App2:: Return ;Super + Alt + Calc
- +^#Launch_App2:: Return ;Shift + Ctrl + Super + Calc
- +^!Launch_App2:: Return ;Shift + Ctrl + Alt + Calc
- +^#!Launch_App2:: Return ;Shift + Ctrl + Super + Alt + Calc
- ;Minimiza/Restaura a calculadora padrão.
- ;Caso o processo não esteja aberto, executa a calculadora.
- Calculator() {
- if WinExist("Calculator ahk_class CalcFrame") or WinExist("Calculator ahk_class ApplicationFrameWindow")
- {
- if WinActive()
- {
- WinMinimize
- Return
- }
- else
- {
- WinActivate
- Return
- }
- }
- else
- {
- Run, calc.exe
- Return
- }
- }
- ;Minimiza/Restaura a calculadora SpeedCrunch.
- ;Caso o processo não esteja aberto, executa a calculadora antes de colocá-la em foco.
- SpeedCrunch() {
- Process, Exist, speedcrunch.exe
- If ErrorLevel
- {
- IfWinNotActive SpeedCrunch
- {
- WinShow, SpeedCrunch ahk_pid %ErrorLevel%
- Sleep 50
- WinActivate, SpeedCrunch ahk_pid %ErrorLevel%
- Return
- }
- else
- {
- WinMinimize, SpeedCrunch ahk_pid %ErrorLevel%
- Return
- }
- }
- Else
- {
- Run, %A_ScriptDir%\SpeedCrunch\speedcrunch.exe
- WinWait, SpeedCrunch
- WinActivate, SpeedCrunch
- Return
- }
- }
- ;Minimiza/Restaura a calculadora altHP.
- ;Caso o processo não esteja aberto, executa a calculadora.
- altHP() {
- if WinExist("IPython: D:Tools/altHP") or WinExist("Select IPython: D:Tools/altHP")
- {
- if WinActive()
- {
- WinMinimize
- Return
- }
- else
- {
- WinActivate
- Return
- }
- }
- else
- {
- Run, %A_ScriptDir%\altHP\calc.bat, %A_ScriptDir%\altHP\
- WinWait, IPython: D:Tools/altHP
- WinActivate, IPython: D:Tools/altHP
- Return
- }
- }
- ;Coloca o prompt Cmder em foco.
- ;Caso o processo não esteja aberto, executa o aplicativo antes de colocá-lo em foco.
- Cmder() {
- Process, Exist, ConEmu64.exe
- If ErrorLevel
- {
- IfWinNotActive Cmder
- {
- Sleep 200
- WinActivate, Cmder
- Return
- }
- }
- Else
- {
- Run, C:\Cmder\Cmder.exe
- WinWait, Cmder
- WinActivate, Cmder
- Return
- }
- }
- ;Coloca o Windows Terminal em foco.
- ;Caso o processo não esteja aberto, executa o prompt.
- WindowsTerminal() {
- Process, Exist, WindowsTerminal.exe
- If ErrorLevel
- {
- IfWinNotActive ahk_class CASCADIA_HOSTING_WINDOW_CLASS
- {
- Sleep 200
- WinActivate, ahk_class CASCADIA_HOSTING_WINDOW_CLASS
- Return
- }
- }
- Else
- {
- Run, wt.exe
- WinWait, ahk_class CASCADIA_HOSTING_WINDOW_CLASS
- WinActivate, ahk_class CASCADIA_HOSTING_WINDOW_CLASS
- Return
- }
- }
- ;Executa o prompt Cmd.
- Cmd() {
- Run, cmd.exe
- WinWait, C:\WINDOWS\SYSTEM32\cmd.exe
- WinActivate, C:\WINDOWS\SYSTEM32\cmd.exe
- Return
- }
- ;Coloca o aplicativo Multi Commander em foco.
- ;Caso o processo não esteja aberto, executa o aplicativo antes de colocá-lo em foco.
- MultiCommander() {
- Process, Exist, MultiCommander.exe
- If ErrorLevel
- {
- IfWinNotActive Multi Commander (x64) v9.6.1 (build 2582) Portable
- {
- Sleep 100
- WinActivate, Multi Commander (x64) v11.0 (build 2770) Portable
- Return
- }
- }
- Else
- {
- Run, %A_ScriptDir%\Multi Commander\x64\MultiCommander.exe
- WinWait, Multi Commander (x64) v11.0 (build 2770) Portable
- WinActivate, Multi Commander (x64) v11.0 (build 2770) Portable
- Return
- }
- }
- ;Executa o aplicativo Process Explorer.
- ProcessExplorer() {
- Process, Exist, procexp64.exe
- If !ErrorLevel
- {
- Run, %A_ScriptDir%\Process Explorer\procexp64.exe
- WinWait, Process Explorer
- WinActivate, Process Explorer
- Return
- }
- Else
- {
- IfWinNotActive Process Explorer
- {
- Sleep 200
- WinActivate, Process Explorer
- Return
- }
- }
- }
- ;Executa o player AIMP.
- Aimp() {
- Process, Exist, AIMP.exe
- If !ErrorLevel
- {
- Run, %A_ScriptDir%\AIMP\AIMP.exe
- }
- Return
- }
- ;Executa ou finaliza a ferramenta de Screen Shot Lightshot.
- Lightshot() {
- Process, Exist, Lightshot.exe
- If !ErrorLevel
- {
- Run, C:\Program Files (x86)\Skillbrains\lightshot\Lightshot.exe
- return
- }
- else
- {
- Process, Close, Lightshot.exe
- Return
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement