From 6e39f8fcd855c02fe9913951b5d59775c921e125 Mon Sep 17 00:00:00 2001 From: breadcat Date: Thu, 13 Aug 2015 14:20:36 +0100 Subject: Small additions and function renames --- functions.ahk | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'functions.ahk') 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%\ -- cgit v1.2.3