diff options
author | breadcat | 2015-08-13 14:20:36 +0100 |
---|---|---|
committer | breadcat | 2015-08-13 14:20:36 +0100 |
commit | 6e39f8fcd855c02fe9913951b5d59775c921e125 (patch) | |
tree | 9af5deee6dcb28c9cd1f37ae2cf40a80e0131880 /functions.ahk | |
parent | e4aa040a949f198aaffc3d88669f91e473227779 (diff) | |
download | ahka-6e39f8fcd855c02fe9913951b5d59775c921e125.tar.gz ahka-6e39f8fcd855c02fe9913951b5d59775c921e125.tar.bz2 ahka-6e39f8fcd855c02fe9913951b5d59775c921e125.zip |
Small additions and function renames
Diffstat (limited to 'functions.ahk')
-rw-r--r-- | functions.ahk | 24 |
1 files changed, 20 insertions, 4 deletions
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%\ |