diff options
author | John Ankarström <john@ankarstrom.se> | 2020-10-23 01:44:02 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-10-23 01:44:02 +0200 |
commit | 1f460f7ebc10c2f8bb66ae684498f49187eab9bc (patch) | |
tree | 776f7a92b0d24e27cd682e4ff76bde477a02ff98 /tt.jump.ahk | |
download | ahk-1f460f7ebc10c2f8bb66ae684498f49187eab9bc.tar.gz |
first commit
Diffstat (limited to 'tt.jump.ahk')
-rw-r--r-- | tt.jump.ahk | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tt.jump.ahk b/tt.jump.ahk new file mode 100644 index 0000000..4ad0d40 --- /dev/null +++ b/tt.jump.ahk @@ -0,0 +1,48 @@ +;; -> init + +JumpPaths := { s: env("Sync") + , w: env("Sync") "\Projekt\john.ankarstrom.se\htdocs" + , e: env("Personal") + , d: env("Personal") "\Downloads" + , b: "C:\Program Files\KM-Goanna\k-meleon.exe" + , m: "C:\Program Files\Mozilla Thunderbird\thunderbird.exe" } + +;; -> body + +; Open in new Explorer window + +#s:: +ToolTip, ... +SendInput, {Blind}{LWin Up} +Input, k, L1 +if (JumpPaths[k] != "") +{ + if (InStr(FileExist(JumpPaths[k]), "D")) + Run, % "explorer /n, """ JumpPaths[k] """" + else + Run, % """" JumpPaths[k] """" +} +ToolTip +return + +; Open in current (or new) Explorer window + +!#s:: +ToolTip, ... +SendInput, {Blind}{LWin Up} +Input, k, L1 +if (JumpPaths[k] != "") + if ((e := Explorer()) != -1) ; (see tt.programs.explorer.ahk) + e.Navigate(JumpPaths[k]) + else + Run, % "explorer """ JumpPaths[k] """" +ToolTip +return + +;; -> library + +env(name) +{ + EnvGet, r, %name% + return r +} |