Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; AutoHotkey Version: 1.x
- ; Language: English
- ; Platform: Win9x/NT
- ; Author: A.N.Other <myemail@nowhere.com>
- ;
- ; Script Function:
- ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
- ;
- #SingleInstance
- #Persistent
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- !d::
- IfWinExist ahk_class Chrome_WidgetWin_1
- {
- WinActivateBottom ahk_class Chrome_WidgetWin_1
- }
- Else
- {
- Run C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
- WinActivateBottom ahk_class Chrome_WidgetWin_1
- }
- Return
- F5::^+F10
- return
- RShift::
- !t::
- ;~ Music! itunes playlists
- #F2::
- Run, E:\random videos\Screensaver Videos\Relax.mp4
- sleep, 100
- WinActivateBottom, Relax.mp4 - VLC media player ahk_class QWidget
- sleep, 100
- Send, {LWin down}{å}{LWin up}
- sleep, 100
- Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_Chillax.vbs
- MouseMove, 1919, 0
- return
- #F3::
- Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_Ka$h.vbs
- return
- #F4::
- Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_!StillChill.vbs
- return
- #F5::
- Run, C:\Program Files (x86)\iTunes\Scripts\Awesome.vbs
- return
- #F6::
- Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_!StillChill.vbs
- ;~ return
- #F7::
- Run, C:\Program Files (x86)\iTunes\Scripts\PlayPlaylist_!StillChill.vbs
- return
- ^!z::
- Run C:\Program Files\Process Hacker 2\ProcessHacker.exe
- return
- !å::
- #NoEnv
- ;#NoTrayIcon
- #SingleInstance Force
- CoordMode, Mouse, Screen
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ShowFull := False
- TooltipSpyActive := True
- SetTimer, TooltipSpy, 30
- Return
- #If TooltipSpyActive
- a::Clipboard := MousePosScreenX ", " MousePosScreenY
- b::Clipboard := MousePosWinX ", " MousePosWinY
- c::Clipboard := ColorHex
- d::Clipboard := "R=" ColorRed ", G=" ColorGreen ", B=" ColorBlue
- e::Clipboard := WinX ", " WinY
- f::Clipboard := WinH " x " WinW
- g::Clipboard := WinTitle
- r::Clipboard := WinClass
- s::Clipboard := WinID
- t::Clipboard := WinCount
- v::Clipboard := ControlClassNN
- w::Clipboard := ControlHwnd
- x::Clipboard := ControlHybrid
- z::Clipboard := ControlHwndDll
- LAlt::Clipboard := MouseInfo WinInfo ControlInfo ;copy everything
- Tab::ShowFull := ShowFull ? False : True ;Toggle between full and truncated
- Esc::TooltipSpyActive := False
- #If
- TooltipSpy:
- ;Cooperatively stop TooltipSpy (otherwise you get the residual unclosed tooltip problem)
- If Not TooltipSpyActive
- {
- SetTimer, TooltipSpy, Off
- ToolTip ;remove tooltip
- Return
- }
- TextLen := ShowFull ? 100: 15 ;Truncate strings so that tooltip to prevent oversized tooltips.
- ;Mouse pointer info
- CoordMode, Mouse, Screen
- MouseGetPos, MousePosScreenX, MousePosScreenY, WinID
- If (PriorX = MousePosScreenX And PriorY = MousePosScreenY And PriorShowFull = ShowFull)
- Return
- ;More mouse pointer info
- CoordMode, Mouse, Window
- MouseGetPos, MousePosWinX, MousePosWinY
- MouseInfo := "MOUSE`n"
- MouseInfo .= " (a) Screen (x, y):`t" MousePosScreenX ", " MousePosScreenY "`n"
- MouseInfo .= " (b) Win. (x, y):`t" MousePosWinX ", " MousePosWinY "`n"
- ;Colour under mouse
- CoordMode Pixel, Screen
- PixelGetColor, ColorHex, %MousePosScreenX%, %MousePosScreenY%, RGB
- ColorRed := (ColorHex & 0xFF0000) >> 16
- ColorGreen := (ColorHex & 0x00FF00) >> 8
- ColorBlue := ColorHex & 0x0000FF
- MouseInfo .= " (c) RGB Hex:`t" ColorHex "`n"
- MouseInfo .= " (d) RGB Dec:`t" ColorRed ", " ColorGreen ", " ColorBlue "`n"
- ;Don't update window info if window is tooltip
- WinGetClass, WinClass, ahk_id %WinID%
- If (WinClass != "tooltips_class32")
- {
- ;Window info
- WinGetPos, WinX, WinY, WinW, WinH, ahk_id %WinID%
- WinGetTitle, WinTitle, ahk_id %WinID%
- WinGet, WinCount, Count, ahk_class %WinClass%
- WinInfo := "WINDOW`n"
- WinInfo .= " (e) X, Y:`t`t" WinX ", " WinY "`n"
- WinInfo .= " (f) H x W:`t" WinH " x " WinW "`n"
- WinInfo .= " (g) Title:`t" SubStr(WinTitle, 1, TextLen) "`n"
- WinInfo .= " (r) Class:`t" SubStr(WinClass, 1, TextLen) "`n"
- WinInfo .= " (s) ID:`t`t" SubStr(WinID, 1, TextLen) "`n"
- WinInfo .= " (t) Count:`t" SubStr(WinCount, 1, TextLen) "`n" ;number of windows of this class
- ;GUI control info
- SetFormat, IntegerFast, hex
- MouseGetPos, m_x, m_y
- MouseGetPos,,,, ControlClassNN, 1
- MouseGetPos,,,, ControlHwnd, 2
- MouseGetPos,,,, ControlHybrid, 3 ;This value is always equal to ControlClass4, but some times it is not retrieved, whereas ControlClass4 always gets correctly retrieved.
- ControlHwndDll := DllCall("WindowFromPoint", "int64", (m_y << 32) | (m_x & 0xFFFFFFFF), "Ptr")
- ControlInfo := "CONTROL`n"
- ControlInfo .= " (v) ClassNN:`t" SubStr(ControlClassNN, 1, TextLen) "`n"
- ControlInfo .= " (w) HWND:`t" SubStr(ControlHwnd, 1, TextLen) "`n"
- ControlInfo .= " (x) Hybrid:`t" SubStr(ControlHybrid, 1, TextLen) "`n"
- ControlInfo .= " (z) HWND_DLL:`t" SubStr(ControlHwndDll, 1, TextLen) "`n"
- }
- TooltipHeader = Esc = Exit`nAlt = Copy everything`nTab = Toggle full/short view`n
- Separator = --------------------------------------`n
- ToolTip %MouseInfo%%Separator%%WinInfo%%Separator%%ControlInfo%%Separator%%TooltipHeader%
- PriorX := MousePosScreenX, PriorY := MousePosScreenY, PriorShowFull := ShowFull
- Return
- $F10::
- IfWinActive ahk_class SunAwtFrame
- {
- Send {F10}
- }
- else
- {
- Send ^{F10}
- }
- Return
- $^s::Send, ^s
- $^d::Send, ^d
- $^t::Send, ^t
- #IfWinActive ahk_class Chrome_WidgetWin_1
- ^s::Send, ^l
- ^d::Send, ^+p ^l
- ^t::Send, ^t ^+p
- Return
- #'::send, ~~
- return
- ;409 514 620
- ;stfuMacro
- #5::
- WinActivateBottom, ahk_class #32770
- MouseClick, left, 514, 286
- WinActivateBottom, ahk_class EsoClientWndClass
- MouseMove, 960, 540
- return
- /*comment in here:
- #610
- #510
- */
- Capslock::
- IfWinActive ahk_class Chrome_WidgetWin_1
- {
- Send, ^t
- }
- IfWinExist ahk_class Chrome_WidgetWin_1
- {
- WinActivateBottom, ahk_class Chrome_WidgetWin_1
- }
- else
- {
- Run C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
- }
- return
- #InstallMouseHook
- ~Shift & WheelUp::
- ; Scroll left.
- ControlGetFocus, fcontrol, A
- Loop 2 ; <-- Increase this value to scroll faster.
- SendMessage, 0x114, 0, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINELEFT.
- IfWinActive, ahk_class AcrobatSDIWindow
- Send {left}{left}
- return
- ~Shift & WheelDown:: ; Scroll right.
- ControlGetFocus, fcontrol, A
- Loop 2 ; <-- Increase this value to scroll faster.
- SendMessage, 0x114, 1, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINERIGHT.
- IfWinActive, ahk_class AcrobatSDIWindow
- Send {right}{right}
- return
- !j::
- Run, C:\Program Files (x86)\spacesniffer\SpaceSniffer.exe
- return
- !m::
- Run, C:\Program Files (x86)\volume mixer shortcut\Volume Mixer.lnk
- return
- #8::
- Run, E:\random videos\Screensaver Videos\Relax.mp4
- sleep, 100
- WinActivateBottom, Relax.mp4 - VLC media player ahk_class QWidget
- sleep, 100
- Send, {Down}
- Send, {Down}
- Send, {Down}
- Send, {Down}
- sleep, 100
- return
- !n::
- Run, C:\Program Files (x86)\Iobit\IObit Uninstaller\Uninstaler_SkipUac.exe
- return
- return
- ^!c::
- Run C:\Program Files (x86)\Orzeszek Timer\Orzeszek Timer.exe - Coffe Time.lnk
- sleep, 1000
- IfWinExist, ahk_class HwndWrapper[Orzeszek Timer.exe;;98ffefea-462b-4069-b50f-b7cd8048bd3f]
- WinActivateBottom, ahk_class HwndWrapper[Orzeszek Timer.exe;;98ffefea-462b-4069-b50f-b7cd8048bd3f]
- sleep, 100
- send, {Enter}
- return
- #esc::
- WinGetTitle, Title, A
- WinKill, %Title%
- return
- #9::
- send, {LWin down}{<}{LWin up}
- return
- #IfWinActive ahk_class ConsoleWindowClass
- ^V::
- SendInput {Raw}%clipboard%
- return
- #IfWinActive
- !w::
- send, {LAlt down}{Space}{LAlt up}
- sleep, 50
- send, {BackSpace}
- sleep, 50
- send,{g}
- sleep, 50
- send,{s}
- sleep, 50
- send,{TAB}
- sleep, 10
- return
- !q::
- send, {LAlt down}{Space}{LAlt up}
- sleep, 50
- send, {BackSpace}
- sleep, 50
- send,{y}
- sleep, 50
- send,{t}
- sleep, 50
- send,{TAB}
- sleep, 10
- return
- #WheelDown::send, {F7}
- return
- #Wheelup::send, {F8}
- return
- IfWinExist, ahk_class NUIDialog
- winkill, ahk_class NUIDialog
- return
- IfWinExist, ahk_class #32770
- WinActivateBottom, #32770
- sleep, 100
- send, {Enter}
- return
- ^!r::
- sleep 100
- reload, C:\Users\Dumpling\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Programming.ahk
- sleep,1000
- reload, C:\Users\Dumpling\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup/Dumpling Script.ahk
- return
- !UP::
- send, !5
- return
- ^+m::
- IfWinExist EPOC Control Panel 2.0.0.20 ahk_class QWidget
- {
- ControlSend,, ^+m,EPOC Control Panel 2.0.0.20
- }
- return
- !2::
- IfWinExist ahk_class Framework::CFrame
- {
- WinActivateBottom, ahk_class Framework::CFrame
- }
- Else
- {
- Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\OneNote 2013.lnk
- }
- return
- #!2::
- Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\OneNote 2013.lnk
- return
- SystemCursor("Init")
- SetTimer, CheckIdle, 250
- return
- CheckIdle:
- TimeIdle := A_TimeIdlePhysical // 1000
- if TimeIdle >= 15
- {
- SystemCursor("Off")
- }
- else
- {
- SystemCursor("On")
- }
- return
- #<::
- send, #{insert}
- return
- #Persistent
- OnExit, ShowCursor ; Ensure the cursor is made visible when the script exits.
- return
- ShowCursor:
- SystemCursor("On")
- ExitApp
- SystemCursor(OnOff=1) ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
- {
- static AndMask, XorMask, $, h_cursor
- ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
- , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13 ; blank cursors
- , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13 ; handles of default cursors
- if (OnOff = "Init" or OnOff = "I" or $ = "") ; init when requested or at first call
- {
- $ = h ; active default cursors
- VarSetCapacity( h_cursor,4444, 1 )
- VarSetCapacity( AndMask, 32*4, 0xFF )
- VarSetCapacity( XorMask, 32*4, 0 )
- system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
- StringSplit c, system_cursors, `,
- Loop %c0%
- {
- h_cursor := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% )
- h%A_Index% := DllCall( "CopyImage", "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 )
- b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0
- , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask )
- }
- }
- if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T"))
- $ = b ; use blank cursors
- else
- $ = h ; use the saved cursors
- Loop %c0%
- {
- h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 )
- DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% )
- }
- }
- !u::
- process,close,XBMC.exe
- return
- !i::
- process,close,python.exe
- return
- ;~ !i::
- ;~ process,close,SnapDo.exe
- ;~ process,close,iTunes.exe
- ;~ process,close,Skype.exe
- ;~ process,close,Dropbox.exe
- ;~ process,close,AvastSvc.exe
- ;~ process,close,JustGestures.exe
- ;~ process,close,Switcher.exe
- ;~ process,close,Rainlender2.exe
- ;~ process,close,Launchy.exe
- ;~ process,close,ObjectDock.exe
- ;~ process,close,CurseClient.exe
- ;~ process,close,xwidget.exe
- ;~ process,close,Rainmeter.exe
- ;~ process,close,EvernoteClipper.exe
- ;~ process,close,WinVnc.exe
- ;~ process,close,Vsee.exe
- ;~ return
- !+<::send ^+{ESC}
- return
- ^UP::^+:
- ^DOWN::^+;
- !4::
- Run C:\Program Files (x86)\XBMC\XBMC.exe
- return
- !a::
- IfWinExist ahk_class Mendeley Desktop
- {
- WinActivateBottom ahk_class Mendeley Desktop
- }
- Else
- {
- Run C:\Program Files (x86)\Mendeley Desktop\MendeleyDesktop.exe
- }
- Return
- ^7::
- send, {\}
- return
- !^q::
- IfWinExist ahk_class ApolloRuntimeContentWindow
- {
- WinActivateBottom, ahk_class ApolloRuntimeContentWindow
- }
- Else
- {
- Run C:\Program Files (x86)\ReadCube\ReadCube.exe
- sleep, 1000
- }
- return
- !0::
- Loop,1
- {
- IfWinExist iTunes ahk_class iTunes
- {
- WinActivateBottom, iTunes ahk_class iTunes
- }
- Else
- {
- Run C:\Program Files (x86)\iTunes\iTunes.exe
- sleep, 5000
- }
- sleep, 500
- WinWaitActive, iTunes ahk_class iTunes
- sleep, 1000
- WinActivateBottom, iTunes ahk_class iTunes
- sleep, 1000
- Send, {LWin down}{Right}{LWin up}
- sleep, 500
- Click, left, 37, 545
- sleep, 500
- Click, left, 393, 148
- sleep, 500
- send, {WheelUp}
- Click, left, 393, 148
- Click, left, 393, 148
- IfWinExist ahk_class MozillaWindowClass
- {
- WinActivateBottom, ahk_class MozillaWindowClass
- }
- Else
- {
- Run C:\Program Files (x86)\Mozilla Firefox\firefox.exe
- }
- WinWaitActive, ahk_class MozillaWindowClass
- Send, {LWin down}{Left}{LWin up}
- sleep, 500
- IfWinExist iTunes ahk_class iTunes
- {
- WinActivateBottom, iTunes ahk_class iTunes
- }
- Else
- {
- Run C:\Program Files (x86)\iTunes\iTunes.exe
- }
- Send, {LWin down}{down}{down}{LWin up}
- sleep,500
- IfWinExist ahk_class MozillaWindowClass
- {
- WinActivateBottom, ahk_class MozillaWindowClass
- }
- Else
- {
- Run C:\Program Files (x86)\Mozilla Firefox\firefox.exe
- }
- WinWaitActive, ahk_class MozillaWindowClass
- Send, {LWin down}{up}{LWin up}
- sleep,50
- Send, {LWin down}{down}{LWin up}
- sleep,50
- Send, {Ctrl down}{d}{Ctrl up}
- sleep,50
- Send, {Ctrl down}{s}{Ctrl up}
- sleep,50
- }
- return
- #½::
- IfWinExist ahk_class SunAwtFrame
- {
- WinActivate
- }
- else
- {
- Run C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.2.3\bin\pycharm.exe.lnk
- WinActivate
- }
- return
- <^>!#½::
- IfWinExist ahk_class SunAwtFrame
- {
- WinActivate
- }
- else
- {
- Run C:\Program Files (x86)\JetBrains\PyCharm Community Edition 5.0.4\bin\pycharms.exe
- WinActivate
- }
- return
- <^>!#1::
- IfWinExist Untitled - Notepad
- {
- WinActivate
- }
- else
- {
- Run Notepad
- WinWait Untitled - Notepad
- WinActivate
- }
- return
- !1::
- IfWinExist RStudio
- {
- WinActivateBottom, RStudio
- }
- Else
- {
- SetWorkingDir, C:\R
- Run C:\R\RStudio\bin\rstudio.exe
- Run, C:\Users\Dumpling\Documents\AutoHotkey\Gdi.ahk
- sleep, 2000
- fullScriptPath = C:\Users\Dumpling\Documents\AutoHotkey\Gdi.ahk ; edit with your full script path
- DetectHiddenWindows, On
- WinClose, %fullScriptPath% ahk_class AutoHotkey
- }
- Return
- <^>!#3::
- IfWinExist Spyder (Python 2.7) ahk_class QWidget
- {
- WinActivate
- }
- else
- {
- Run C:\Anaconda\pythonw.exe "C:\Anaconda\Scripts/spyder-script.py"
- WinActivate
- }
- return
- <^>!#4::
- sleep, 500
- send, {LWin}
- sleep, 50
- send, {p}
- sleep, 50
- send, {s}
- sleep, 50
- send, {y}
- sleep, 50
- send, {ENTER}
- sleep, 50
- Return
- <^>!#5::
- IfWinExist Python 2.7.6 Shell ahk_class TkTopLevel
- {
- WinActivate
- }
- else
- {
- Run C:\Python27\Lib\idlelib\idle.bat
- WinActivate
- }
- return
- <^>!#6::
- IfWinExist Python 3.3.2 Shellahk_class TkTopLevel
- {
- WinActivate
- }
- else
- {
- Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.4\IDLE (Python GUI).lnk
- WinActivate
- }
- return
- <^>!#7::
- IfWinExist ahk_class Notepad++
- {
- WinActivate
- }
- else
- {
- Run C:\Program Files (x86)\Notepad++\notepad++.exe
- WinActivate
- }
- return
- #+::
- send, {LWin down}{Lalt down}{*}{LWin up}{Lalt up}
- return
- !k::
- Runwait, taskkill /im firefox.exe
- return
- ^<::
- Send {PrintScreen}
- return
- ^e::^!+j
- return
- !^w::
- Run C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\word 2013
- return
- !s::
- IfWinExist iTunes ahk_class iTunes
- {
- WinActivateBottom, iTunes ahk_class iTunes
- Process, Exist, itc.exe
- itc_pid=%errorLevel%
- If (itc_pid = 0)
- Run C:\Program Files (x86)\iTunesControl\itc.exe
- }
- Else
- {
- Run C:\Program Files\iTunes\iTunes.exe
- Process, Exist, itc.exe
- itc_pid=%errorLevel%
- If (itc_pid = 0)
- Run C:\Program Files (x86)\iTunesControl\itc.exe
- }
- Return
- ^!g::
- Winmaximize,A
- return
- !½:: send, Timokvamme@gmail.com
- !e::
- IfWinExist ahk_class µTorrent4823DF041B09
- {
- WinActivateBottom, ahk_class µTorrent4823DF041B09
- }
- Else
- {
- Run C:\Program Files (x86)\uTorrent\uTorrent.exe
- Run C:\Users\Dumpling\Documents\AutoHotkey\UtorrentScript.ahk
- }
- Return
- pathToScript = C:\Users\Dumpling\Documents\AutoHotkey\UtorrentScript.ahk
- DetectHiddenWindows, On
- !r::
- Runwait, taskkill /im utorrent.exe /f
- WinClose, %pathToScript% ahk_class AutoHotkey
- return
- !h::
- Edit C:\Users\Dumpling\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Dumpling Hotkeys.ahk
- return
- !Del::
- Shutdown, Code 1
- !æ::
- process,close,Bigmouse.exe
- return
- !f::
- Run C:\Users\timok_000\Dropbox\EFABM-AAA
- return
- <^>!#f::
- Run, https://play.google.com/books/reader?printsec=frontcover&output=reader&id=Q9GCAgAAQBAJ
- return
- Alt & LButton::
- CoordMode, Mouse ; Switch to screen/absolute coordinates.
- MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin
- WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin%
- WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin%
- if EWD_WinState = 0 ; Only if the window isn't maximized
- SetTimer, EWD_WatchMouse, 10 ; Track the mouse as the user drags it.
- return
- EWD_WatchMouse:
- GetKeyState, EWD_LButtonState, LButton, P
- if EWD_LButtonState = U ; Button has been released, so drag is complete.
- {
- SetTimer, EWD_WatchMouse, off
- return
- }
- GetKeyState, EWD_EscapeState, Escape, P
- if EWD_EscapeState = D ; Escape has been pressed, so drag is cancelled.
- {
- SetTimer, EWD_WatchMouse, off
- WinMove, ahk_id %EWD_MouseWin%,, %EWD_OriginalPosX%, %EWD_OriginalPosY%
- return
- }
- ; Otherwise, reposition the window to match the change in mouse coordinates
- ; caused by the user having dragged the mouse:
- CoordMode, Mouse
- MouseGetPos, EWD_MouseX, EWD_MouseY
- WinGetPos, EWD_WinX, EWD_WinY,,, ahk_id %EWD_MouseWin%
- SetWinDelay, -1 ; Makes the below move faster/smoother.
- WinMove, ahk_id %EWD_MouseWin%,, EWD_WinX + EWD_MouseX - EWD_MouseStartX, EWD_WinY + EWD_MouseY - EWD_MouseStartY
- EWD_MouseStartX := EWD_MouseX ; Update for the next timer-call to this subroutine.
- EWD_MouseStartY := EWD_MouseY
- return
- !z::
- {
- Sleep 50
- Send, ^c
- Sleep 50
- Send, ^c
- Run, http://www.google.com/search?q=%clipboard%
- Return
- }
- ^!c::
- {
- Run, cmd.exe, C:\
- return
- }
- !v::
- {
- Send, ^c
- Sleep 50
- Run, http://www.google.com/search?q=%clipboard%&tbm=isch
- Return
- }
- !x::
- {
- Send, ^c
- Sleep 50
- Run, http://www.youtube.com/results?search_query=%clipboard%
- Return
- }
- #a::
- SendInput, {(}{)}{Left}
- return
- #d::
- ;Send, {[}{]}{Left}
- return
- #s::
- Send, {'}{'}{Left}
- return
- #w::
- Send, {{}{}}{Left}
- return
- #q::
- Send, ^c
- IfWinExist ahk_class wxWindowClassNR
- {
- WinActivateBottom, ahk_class wxWindowClassNR
- Send, {F3}
- sleep, 2000 ;
- Send, ^v
- Send, {F9}
- Send, {Enter}
- Send, {Backspace}
- Send, {F9}
- }
- Else
- {
- Run C:\Program Files (x86)\Gyldendals Røde Ordbøger by iMortaluz/Gyldendals Ordbøger by iMortaluz.exe
- sleep, 2000 ;
- Send, {F9}
- Send, {F3}
- Send, ^v
- Send, {Enter}
- Send, {Backspace}
- Send, {F9}
- }
- Return
- ^CapsLock::
- IfWinExist ahk_class TfrmArticleSpinner Song Search ahk_class iTC_SongSearch
- {
- WinClose
- }
- Else
- send, ^å
- return
- ;~ resizing windows resize
- ResizeWin(Width = 0,Height = 0)
- {
- WinGetPos,X,Y,W,H,A
- If %Width% = 0
- Width := W
- If %Height% = 0
- Height := H
- WinMove,A,,%X%,%Y%,%Width%,%Height%
- }
- ResizeWin_atzeropos(Width = 0,Height = 0)
- {
- WinGetActiveTitle, Title
- WinGetPos,X,Y,W,H,A
- WinMinimize
- If %Width% = 0
- Width := W
- If %Height% = 0
- Height := H
- WinMove,A,,%X%,%Y%,%Width%,%Height%
- sleep, 100
- WinMove, Title of the window, , 0, 0
- }
- ;~ #c::ResizeWin_atzeropos(1800,1100)
- #c::
- WinGetActiveTitle, Title
- WinRestore, %Title%
- SysGet, X1, 76
- SysGet, Y1, 77
- SysGet, Width, 78
- SysGet, Height, 79
- WinMove, %Title%,, 50, 50, 1820, 970
- return
- !p::
- process,close,Switcher.exe
- process,close,Justgestures.exe
- return
- !o::
- Run C:\Program Files (x86)\Switcher/Switcher.exe
- Run C:\Program Files (x86)\Just Gestures/JustGestures.exe
- sleep, 1000 ;
- IfWinExist ahk_class WindowsForms10.Window.8.app.0.378734a
- {
- WinActivateBottom, ahk_class WindowsForms10.Window.8.app.0.378734a
- Send,{Enter}
- }
- Else
- {
- sleep, 1000 ;
- WinActivateBottom, ahk_class WindowsForms10.Window.8.app.0.378734a
- Send,{Enter}
- }
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement