summaryrefslogtreecommitdiffstats
path: root/ahk-assistant.ahk
diff options
context:
space:
mode:
authorbreadcat2013-10-02 21:24:59 +0100
committerbreadcat2013-10-02 21:24:59 +0100
commitdc26569e3b2c4495947ac1e47ee5a6e7df44dfe9 (patch)
treedf2c5f91a585ce28c065ca363d2803d618b27e04 /ahk-assistant.ahk
parent8a0c256694fdc3f9f6b5380e1cc68d8a79469b7d (diff)
downloadahka-dc26569e3b2c4495947ac1e47ee5a6e7df44dfe9.tar.gz
ahka-dc26569e3b2c4495947ac1e47ee5a6e7df44dfe9.tar.bz2
ahka-dc26569e3b2c4495947ac1e47ee5a6e7df44dfe9.zip
Merge functions with main
Only contained a single function
Diffstat (limited to 'ahk-assistant.ahk')
-rw-r--r--ahk-assistant.ahk38
1 files changed, 34 insertions, 4 deletions
diff --git a/ahk-assistant.ahk b/ahk-assistant.ahk
index 44aa6d2..09f47db 100644
--- a/ahk-assistant.ahk
+++ b/ahk-assistant.ahk
@@ -81,6 +81,9 @@ Capslock::Backspace
XButton1::Send {Click 2} ;double click
XButton2::Send {MButton} ;wheel click
+;application specific hotkeys
+#Include, %A_ScriptDir%\appspecific.ahk ;too many to include in index, deserves separating
+
;auto replace text with symbols
::(c)::©
@@ -183,10 +186,37 @@ Return
#Numpad8::Shift("T")
#Numpad9::Shift("TR")
-
-;includes
-#Include, %A_ScriptDir%\appspecific.ahk ;too many to include in index, deserves separating
-#Include, %A_ScriptDir%\functions.ahk ;functions don't belong in index
+Shift(Pos)
+{
+ WinGetClass, class, A
+ IfInString , shell_TrayWnd,Progman,Button,DV2ControlHost, %class%
+ Return
+ IfWinExist,ahk_class Shell_TrayWnd
+ SysGet, m, MonitorWorkArea
+ Else SysGet, m, Monitor
+ WinGetPos, MWT_X, MWT_Y, MWT_W, MWT_H, A
+ SendMessage, 0x1F,,,, A
+ WinGet, MWT_active, MinMax, A
+ if (MWT_active = 1)
+ WinRestore, A
+ If (Pos = "T")
+ WinMove, A,, 0, 0, mRight, mBottom/2
+ If (Pos = "B")
+ WinMove, A,, 0, mBottom/2, mRight, mBottom/2
+ If (Pos = "L")
+ WinMove, A,, 0, 0, mRight/2, mBottom
+ If (Pos = "R")
+ WinMove, A,, mRight/2, 0, mRight/2, mBottom
+ If (Pos = "TL")
+ WinMove, A,, 0, 0, mRight/2, mBottom/2
+ If (Pos = "TR")
+ WinMove, A,, mRight/2, 0, mRight/2, mBottom/2
+ If (Pos = "BR")
+ WinMove, A,, mRight/2, mBottom/2, mRight/2, mBottom/2
+ If (Pos = "BL")
+ WinMove, A,, 0, mBottom/2, mRight/2, mBottom/2
+}
+Return
;auto-reload on change