-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from pilgrimlyieu/v1_to_v2
- Loading branch information
Showing
41 changed files
with
1,639 additions
and
1,723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,56 @@ | ||
#Requires AutoHotkey v1.1.36.02+ | ||
#NoTrayIcon | ||
|
||
Fn_Status := 0 | ||
|
||
#Space:: | ||
Fn_Status := !Fn_Status | ||
ToolTip % Fn_Status ? "Fn is turned on." : "Fn is turned off." | ||
SetTimer RemoveToolTip, -1000 | ||
return | ||
|
||
!Space:: | ||
ToolTip % Fn_Status ? "Fn is on." : "Fn is off." | ||
SetTimer RemoveToolTip, -1000 | ||
return | ||
|
||
RemoveToolTip: | ||
ToolTip | ||
return | ||
|
||
#If Fn_Status and WinActive("ahk_exe msedge.exe") | ||
f4::SendInput {Browser_Home} | ||
f5::SendInput {Browser_Refresh} | ||
f6::SendInput {Browser_Back} | ||
f7::SendInput {Browser_Forward} | ||
|
||
#If Fn_Status | ||
f1::SendInput {Volume_Mute} | ||
f2::SendInput {Volume_Up} | ||
f3::SendInput {Volume_Down} | ||
#Space::{ | ||
global Fn_Status | ||
Fn_Status := !Fn_Status | ||
ToolTip(Fn_Status ? "Fn is turned on." : "Fn is turned off.") | ||
SetTimer(() => ToolTip(), -1000) | ||
} | ||
|
||
f8:: | ||
if WinExist("ahk_exe Anki.exe") { | ||
if !WinActive("ahk_exe Anki.exe") | ||
WinActivate ahk_exe Anki.exe | ||
!Space::{ | ||
global Fn_Status | ||
ToolTip(Fn_Status ? "Fn is on." : "Fn is off.") | ||
SetTimer(() => ToolTip(), -1000) | ||
} | ||
else | ||
Run "G:\Movable Computer\Movable Software\Program Files\Anki\Anki.exe" -b "G:\Movable Computer\Movable Software\Program Files\Anki\AnkiData" | ||
return | ||
|
||
f9:: | ||
if WinExist("GeoGebra") { | ||
if !WinActive("GeoGebra") | ||
WinActivate GeoGebra | ||
#HotIf Fn_Status && WinActive("ahk_exe msedge.exe") | ||
F4::SendInput("{Browser_Home}") | ||
F5::SendInput("{Browser_Refresh}") | ||
F6::SendInput("{Browser_Back}") | ||
F7::SendInput("{Browser_Forward}") | ||
|
||
#HotIf Fn_Status | ||
F1::SendInput("{Volume_Mute}") | ||
F2::SendInput("{Volume_Up}") | ||
F3::SendInput("{Volume_Down}") | ||
|
||
F9::{ | ||
if WinExist("GeoGebra") { | ||
if !WinActive("GeoGebra") | ||
WinActivate("GeoGebra") | ||
} | ||
else | ||
Run("GeoGebra.exe", "D:\Program Files\GeoGebra") | ||
} | ||
else | ||
Run GeoGebra.exe, D:\Program Files\GeoGebra | ||
return | ||
|
||
f10:: | ||
if WinExist("ahk_exe msedge.exe") { | ||
if !WinActive("ahk_exe msedge.exe") | ||
WinActivate ahk_exe msedge.exe | ||
F10::{ | ||
if WinExist("ahk_exe msedge.exe") { | ||
if !WinActive("ahk_exe msedge.exe") | ||
WinActivate("ahk_exe msedge.exe") | ||
} | ||
else | ||
Run("msedge.exe") | ||
} | ||
else | ||
Run MSEdge.exe | ||
return | ||
|
||
f11::Run Explorer.exe | ||
F11::Run("explorer.exe") | ||
|
||
f12:: | ||
if WinExist("计算器") { | ||
if !WinActive("计算器") | ||
WinActivate 计算器 | ||
} | ||
else | ||
Run Calc.exe | ||
return | ||
F12::{ | ||
if WinExist("计算器") { | ||
if !WinActive("计算器") | ||
WinActivate("计算器") | ||
} | ||
else | ||
Run("calc.exe") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#Requires AutoHotkey v1.1.36.02+ | ||
#NoTrayIcon | ||
|
||
NumpadAdd::Volume_Up | ||
NumpadSub::Volume_Down | ||
NumpadSub::Volume_Down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#Requires AutoHotkey v1.1.36.02+ | ||
#NoTrayIcon | ||
|
||
Pause::Volume_Mute | ||
Pause::Volume_Mute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#Requires AutoHotkey v1.1+ | ||
;@Ahk2Exe-SetMainIcon Shutdown.ico | ||
|
||
#NoTrayIcon | ||
|
||
Warn(WarnMinute) { | ||
Warning := "还有 " WarnMinute " 分钟就要关机!请注意保存重要内容!" | ||
if ExtendLevel | ||
Warning .= "是否要延长 " ExtendMinute " 分钟关机?" | ||
return Warning | ||
} | ||
|
||
Hint(WarnMinute) { | ||
DeltaTime := SDTime | ||
DeltaTime -= %A_Now%, Seconds | ||
Sleep % 1000 * (DeltaTime - WarnMinute * 60) | ||
if WarnMinute { | ||
MsgBox % 4416 - ExtendLevel * 28, 即将关机, % Warn(WarnMinute), 10 | ||
IfMsgBox Yes | ||
{ | ||
SDTime += ExtendMinute, Minutes | ||
ExtendLevel -- | ||
} | ||
} | ||
else | ||
Shutdown 1 | ||
} | ||
|
||
Global SDTime := A_YYYY A_MM A_DD 233000 | ||
Global WarnMinutes := [5, 3, 1, 0] | ||
Global ExtendLevel := 1 | ||
Global ExtendMinute := 5 | ||
for Index, Min in WarnMinutes | ||
Hint(Min) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
Deprecated/SpecificRun/WeMeetApp.ahk → Deprecated/SpecificRun/WeMeetApp.ahk1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
Deprecated/StartUp/StartUp.ahk → Deprecated/StartUp/StartUp.ahk1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
#Requires AutoHotkey v1.1.36.02+ | ||
#NoTrayIcon | ||
|
||
WorkingDir := "G:\Assets\Tool\AutoHotkey\" | ||
Mappings_Helps := {"Fn": "Basic\Remap\Fn" | ||
, "WinDrag": "Basic\Window\WinDrag\WinDrag" | ||
, "Tips": "General\Tips\Run" | ||
, "Anki_ChineseKeyWord": "Specific\Anki\ChineseKeyWord" | ||
, "Anki_Derive": "Specific\Anki\Derive" | ||
, "Anki_Cloze": "Specific\Anki\Cloze" | ||
, "Vark": "Tool\Vark\Vark" | ||
, "Vanki": "Tool\Vark\Vanki"} | ||
global WorkingDir := "G:/Project/Scripts/AutoHotkey/" | ||
global Mappings_Helps := Map( | ||
"Fn" , "Basic/Remap/Fn", | ||
"WinDrag" , "Basic/Window/WinDrag/WinDrag", | ||
"Tips" , "General/Tips/Run", | ||
"Anki_ChineseKeyWord", "Specific/Anki/ChineseKeyWord", | ||
"Anki_Derive" , "Specific/Anki/Derive", | ||
"Anki_Cloze" , "Specific/Anki/Cloze", | ||
"Vark" , "Tool/Vark/Vark", | ||
"Vanki" , "Tool/Vark/Vanki", | ||
) | ||
|
||
Alias := [] | ||
text := "Helps:" | ||
for index in Mappings_Helps | ||
Alias.Push(index) | ||
for index, value in Alias | ||
text .= "`r" index ": " value | ||
global Alias := [] | ||
global text := "Helps:" | ||
for key in Mappings_Helps | ||
Alias.Push(key) | ||
for index, key in Alias | ||
text .= "`r" index ": " key | ||
|
||
#F1:: | ||
InputBox number, Helps, %text%, , , % 100 + 20 * index , , , , 5 | ||
if !ErrorLevel | ||
Run % "D:/Program Files/Snipaste/Snipaste.exe paste --files " WorkingDir Mappings_Helps[Alias[number]] ".png" | ||
return | ||
#F1::{ | ||
number := InputBox(text, "Helps", "T5 H" String(100 + 20 * Alias.Length)) | ||
if number.Result == "OK" | ||
try Run("D:/Program Files/Snipaste/Snipaste.exe paste --files " WorkingDir Mappings_Helps[Alias[Integer(number.Value)]] ".png") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Requires AutoHotkey v1.1+ | ||
#NoTrayIcon | ||
|
||
#Hotstring c r t * | ||
::p@::[email protected] | ||
::P@::[email protected] | ||
::P@::[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
#Requires AutoHotkey v1.1.36.02+ | ||
#NoTrayIcon | ||
|
||
Global LBNum := 300, CheckMins := 30, BreakTime := 60, ForceTime := 30 | ||
global LBKeyNum := 600, CheckMins := 30, BreakSeconds := 60, ForceSeconds := 30 | ||
|
||
~LButton:: | ||
If (LButtonKeyNum > 0) { | ||
LButtonKeyNum ++ | ||
Return | ||
} | ||
LButtonKeyNum := 1 | ||
SetTimer MouseHand, % - 60000 * CheckMins | ||
Return | ||
KeyLeftButton(ThisHotkey) { | ||
static LButton_key_num := 0 | ||
if LButton_key_num > 0 | ||
return LButton_key_num++ | ||
LButton_key_num := 1 | ||
SetTimer(LockMouse, -60000 * CheckMins) | ||
|
||
MouseHand: | ||
If (LButtonKeyNum >= LBNum) { | ||
MsgBox 4144, 休息锁定模式, 已经高强度使用鼠标 %CheckMins% 分钟了 ,活动一下手吧!可在休息至少 %ForceTime%s 后按 Esc 键退出锁定模式。, 10 | ||
CoordMode Mouse | ||
MouseGetPos XPos, YPos | ||
Loop % ForceTime { | ||
Sleep 1000 | ||
MouseMove XPos, YPos | ||
LockMouse() { | ||
if LButton_key_num >= LBKeyNum { | ||
BlockInput("MouseMove") | ||
MsgBox("已经高强度使用鼠标 " CheckMins " 分钟了,活动一下手吧!可在休息至少 " ForceSeconds "s 后按 Esc 键退出锁定模式。", "休息锁定模式", "Icon! 0x1000 T5") | ||
UnlockMouse(ThisHotkey) => BlockInput("MouseMoveOff") | ||
SetTimer(() => Hotkey("~Esc", UnlockMouse, "On"), -1000 * ForceSeconds) | ||
SetTimer(() => Hotkey("~Esc", UnlockMouse, "Off"), -1000 * BreakSeconds) | ||
SetTimer(() => UnlockMouse, -1000 * BreakSeconds) | ||
} | ||
LButton_key_num := 0 | ||
} | ||
Loop % BreakTime - ForceTime { | ||
KeyWait Esc, DT1 | ||
MouseMove XPos, YPos | ||
} Until !ErrorLevel | ||
} | ||
LButtonKeyNum := 0 | ||
Return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,29 @@ | ||
#Requires AutoHotkey v1.1.36.02+ | ||
#NoTrayIcon | ||
|
||
; 请将 Everything 目录放 PATH | ||
#f::{ | ||
ClipSaved := ClipboardAll() | ||
A_Clipboard := "" | ||
SendInput("{Ctrl Down}c{Ctrl Up}") | ||
ClipWait(0.5, 0) | ||
selected := Trim(A_Clipboard) | ||
if InStr(FileExist(selected), "D") | ||
; "Run(everything -path `"" selected "`"") ; 为路径则打开路径(包括子文件夹) | ||
Run("everything -parent `"" selected "`"") ; 为路径则打开路径(不包括子文件夹) | ||
else | ||
Run("everything -search `"" selected "`"") ; 不为路径则搜索指定内容 | ||
A_Clipboard := ClipSaved | ||
ClipSaved := "" | ||
} | ||
|
||
if not A_IsAdmin | ||
Run *RunAs "%A_ScriptFullPath%" /restart | ||
^Space::{ | ||
ProxyStatus := RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable") | ||
RegWrite(ProxyStatus := !ProxyStatus, "REG_DWORD", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable") | ||
ToolTip("Proxy has been switched " (ProxyStatus ? "On." : "Off.")) | ||
SetTimer(() => ToolTip(), -1000) | ||
} | ||
|
||
#f:: | ||
Clip := ClipboardAll | ||
Clipboard := "" | ||
SendInput {Ctrl Down}c{Ctrl Up} | ||
ClipWait 0 | ||
selected := Trim(Clipboard) | ||
if InStr(FileExist(selected), "D") | ||
; Run everything -path "%selected%" ; 为路径则打开路径(包括子文件夹) | ||
Run everything -parent "%selected%" ; 为路径则打开路径(不包括子文件夹) | ||
else if selected != "" | ||
Run everything -search "%selected%" ; 不为路径则搜索指定内容 | ||
else | ||
Run everything -home ; 未选中内容时打开主界面 | ||
Clipboard := Clip | ||
return | ||
|
||
^Space:: | ||
RegRead ProxyStatus, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings, ProxyEnable | ||
RegWrite REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings, ProxyEnable, % ProxyStatus := !ProxyStatus | ||
ToolTip % "Proxy has been switched " (ProxyStatus ? "On" : "Off") "." | ||
SetTimer RemoveToolTip, -1000 | ||
return | ||
|
||
#!Space:: | ||
RegRead TouchpadStatus, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\Status, Enabled | ||
Run % "SystemSettingsAdminFlows.exe EnableTouchPad " (TouchpadStatus := !TouchpadStatus) | ||
return | ||
|
||
RemoveToolTip: | ||
ToolTip | ||
return | ||
#!Space::{ | ||
TouchpadStatus := RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\Status", "Enabled") | ||
Run("SystemSettingsAdminFlows.exe EnableTouchPad " (TouchpadStatus := !TouchpadStatus)) | ||
} |
Oops, something went wrong.