summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbreadcat2015-08-13 14:20:36 +0100
committerbreadcat2015-08-13 14:20:36 +0100
commit6e39f8fcd855c02fe9913951b5d59775c921e125 (patch)
tree9af5deee6dcb28c9cd1f37ae2cf40a80e0131880
parente4aa040a949f198aaffc3d88669f91e473227779 (diff)
downloadahka-6e39f8fcd855c02fe9913951b5d59775c921e125.tar.gz
ahka-6e39f8fcd855c02fe9913951b5d59775c921e125.tar.bz2
ahka-6e39f8fcd855c02fe9913951b5d59775c921e125.zip
Small additions and function renames
-rw-r--r--ahk-assistant.ahk17
-rw-r--r--functions.ahk24
2 files changed, 32 insertions, 9 deletions
diff --git a/ahk-assistant.ahk b/ahk-assistant.ahk
index 5c127cb..6c2bfba 100644
--- a/ahk-assistant.ahk
+++ b/ahk-assistant.ahk
@@ -44,6 +44,7 @@ SetNumLockState, AlwaysOn
^!v::Run %ProgramFilesX86%\TightVNC\tvnviewer.exe
^!k::launchKeepass()
#c::Run calc
+^+v::Send %clipboard% ;manually paste clipboard, minus formatting
#\::SendMessage 0x112, 0xF170, 2, , Program Manager ;W-\ - screen standby
^!\::DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
SC029::Send, 0 ;Backtick send zeroes
@@ -63,6 +64,8 @@ XButton2::Send {MButton} ;remap logitech m570 x2 to wheel click
#+Space::insertDateTime()
Insert::appendClipboard()
^!Space::toggleAudioDevice()
+Ralt & PgUp::Send {WheelUp}
+Ralt & PgDn::Send {WheelDown}
!LButton::kdeMove()
!RButton::kdeResize()
@@ -85,6 +88,9 @@ Insert::appendClipboard()
#NumpadIns::winSplitH() ;W-S-Num0
;text replacements
+:*?:_gw::
+ insertGateway()
+ Return
:*?:_sig::
insertSignature()
Return
@@ -116,16 +122,16 @@ Insert::appendClipboard()
insertPostCode()
Return
:*:_db::
- typeSync()
+ insertSync()
Return
:*:_gd::
- typeSyncDocs()
+ insertSyncDocs()
Return
:*:_md::
- typeDocuments()
+ insertDocuments()
Return
:*:_cw::
- typeCygwin()
+ insertCygwin()
Return
;swedish
@@ -344,7 +350,8 @@ Insert::appendClipboard()
^!d::Send ^j ;why Downloads is ctrl+j while addons is ctrl+alt+a will never make sense
^d::Send ^f ;bookmark remapped to find
^b::Send ^v ;replace bookmarks with paste
- #o::Send, ^c{F6}^v{Enter} ;copy selected uri and open, right click option fails to recognise ~50% of what I try
+ #o::Send, ^c{F6}^v{Enter} ;copy selected uri and open in current tab
+ #+o::Send, ^c^t^v{Enter} ;copy selected uri and open in new tab
^+o::Send !to ;C-S-o options
F1:: ;overflow
F2::tabSplit() ;split current tab from window and tile, kinda flakey and in need of improvement
diff --git a/functions.ahk b/functions.ahk
index 356a35b..762a10c 100644
--- a/functions.ahk
+++ b/functions.ahk
@@ -47,6 +47,22 @@ launchKeepass() {
Return
}
+insertGateway() {
+ RunWait , %comspec% /c ipconfig > %A_Temp%\gw.txt,, Hide
+ ArrayCount = 0
+ Loop, Read, %A_Temp%\gw.txt
+ {
+ Count := RegExMatch(A_LoopReadLine, ".*Default Gateway .+ ((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)).*",ip)
+ If ( %Count% != 0) {
+ ArrayCount += 1
+ IP_Array%ArrayCount% := ip1
+ gateway := ip1
+ }
+ }
+ FileDelete %A_Temp%\gw.txt
+ Send, %gateway%
+ }
+
insertDate() {
FormatTime, CurrentDateTime,, yyyy-MM-dd
Send %CurrentDateTime%
@@ -107,7 +123,7 @@ dialTelephone() { ;lg phone-link
Return
}
-typeSyncDocs() {
+insertSyncDocs() {
If A_OSVersion in WIN_XP
{
Send %A_MyDocuments%\Vault\docs\
@@ -119,7 +135,7 @@ typeSyncDocs() {
Return
}
-typeDocuments() {
+insertDocuments() {
If A_OSVersion in WIN_XP
{
Send %A_MyDocuments%
@@ -131,7 +147,7 @@ typeDocuments() {
Return
}
-typeSync() {
+insertSync() {
If A_OSVersion in WIN_XP
{
Send %A_MyDocuments%\Vault\
@@ -143,7 +159,7 @@ typeSync() {
Return
}
-typeCygwin() {
+insertCygwin() {
If A_OSVersion in WIN_XP
{
Send C:\cygwin\home\%A_UserName%\