Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ---- Opening folders
- ;When I press F3, I want to open Dropbox
- F3:: Run C:\Users\user\Dropbox
- Statistics("hic")
- return
- ;When I press F3, I want to open Download
- F4:: Run C:\Users\user\Downloads
- ;--- Remaping
- LWin::Ctrl
- Insert:: return
- ;When I press atl+x in Firefox, I want to activate alt+maj+a
- !x::
- IfWinActive, ahk_class MozillaWindowClass
- Send, !+a
- return
- ;When I press alt+n, I want to create a new folder
- !n::send {AppsKey}wf
- ; ---- Music Player
- ; When I press F12, I want to play the next song
- F12::
- Send {Media_Next}
- return
- ;previous song
- F10::
- Send {Media_Prev}
- return
- ;play/pause
- F1::
- Send {Media_Play_Pause}
- return
- ;Volume mute
- F7::
- Send {Volume_Mute}
- return
- ;Volume down
- F8::
- Send {Volume_Down}
- return
- ;previous song
- F9::
- Send {Volume_Up}
- return
- ~Alt & WheelUp:: ; Scroll left.
- Send {Volume_Up}
- return
- ~Alt & WheelDown:: ; Scroll left.
- Loop 4
- Send {Volume_Down}
- return
- ; --- Program Launching
- ; When I press alt+F, I want to open firefox
- !f::Run Firefox
- ;When I press alt+w, I want to open the wordpress miiy menu
- !w::Run http://www.miiy.fr/wp-admin/
- ;When I press alt+T, I want to open todo.txt
- !t::Run C:\Users\user\Dropbox\Pratique\to do.txt
- ;When I press ², I want to open thunderbird
- ²::Run C:\Program Files\Mozilla Thunderbird\thunderbird.exe
- ;When I press printscreen, I want to open the spinning tool
- PRINTSCREEN::Run, "C:\Windows\System32\SnippingTool.exe"
- ;When I press F2, I want to launch evernote
- F2::Run Evernote
- ; ---- Text completion
- ;When I press cdlm, I want to print "Cordialement, Loïs Boullu
- ::cdlm:: Cordialement {enter} {enter} Loïs Boullu
- ::çç::Ç
- ::éé::É
- ::beq::\begin{{}equation{}}{enter}{enter}\end{{}equation{}}
- ::oe::œ
- ; Specials
- ;When I press Ctrl+D, I want to access the desktop
- ^D::
- Send, {LWin Down}d{LWin Up}
- Return
- ;When I press alt+g, I want to search google for the highlighted text
- !g::
- ;Copy Clipboard to prevClipboard variable, clear Clipboard.
- prevClipboard := ClipboardAll
- Clipboard =
- ;Copy current selection, continue if no errors.
- SendInput, ^c
- ClipWait, 2
- if !(ErrorLevel) {
- ;Convert Clipboard to text, auto-trim leading and trailing spaces and tabs.
- Clipboard = %Clipboard%
- ;Clean Clipboard: change carriage returns to spaces, change >=1 consecutive spaces to +
- Clipboard := RegExReplace(RegExReplace(Clipboard, "\r?\n"," "), "\s+","+")
- ;Open URLs, Google non-URLs. URLs contain . but do not contain + or .. or @
- if Clipboard contains +,..,@
- Run www.google.com/search?q=%Clipboard%
- else if Clipboard not contains .
- Run www.google.com/search?q=%Clipboard%
- else
- Run %Clipboard%
- }
- ;Restore Clipboard, clear prevClipboard variable.
- Clipboard := prevClipboard
- prevClipboard =
- return
- Statistics(id)
- {
- FormatTime, vdate, ddMMyyyy
- FileAppend,%vdate% | %id% `n , F:\hotkeys.txt
- }
- Alt & Enter:: ; alt+enter to maximize the window
- WinGet, TempWindowID, ID, A
- If (WindowID != TempWindowID)
- {
- WindowID:=TempWindowID
- WindowState:=0
- }
- If (WindowState != 1)
- {
- WinGetPos, WinPosX, WinPosY, WindowWidth, WindowHeight, ahk_id %WindowID%
- WinSet, Style, ^0xC40000, ahk_id %WindowID%
- WinMove, ahk_id %WindowID%, , 0, 0, A_ScreenWidth, A_ScreenHeight
- }
- Else
- {
- WinSet, Style, ^0xC40000, ahk_id %WindowID%
- WinMove, ahk_id %WindowID%, , WinPosX, WinPosY, WindowWidth, WindowHeight
- }
- WindowState:=!WindowState
- return
- ~LButton & RButton::
- {
- Sleep, 100
- Send {Media_Next}
- Return
- }
- ~RButton & LButton::
- {
- Sleep, 100
- Send {Media_Prev}
- Return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement