-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path鼠标配合-家庭.ahk
89 lines (71 loc) · 1.91 KB
/
鼠标配合-家庭.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#Warn ; Enable warnings to assist with detecting common errors.
SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory.
TraySetIcon("icon.ico")
#include 公共.ahk
; window+control+b 打开B盘
#^b::
{
pid:=ProcessExist("dopus.exe")
if(pid==0)
Run "B:\"
else
{
fullPath := GetModuleFileNameEx(pid)
SplitPath fullPath, , &folderPath
Run folderPath "\dopusrt.exe /acmd Go B:\ NEWTAB=findexisting`,tofront"
handle:=WinWaitActive("B:\ ahk_pid " pid, , 5)
if(handle!=0)
WinActivate "ahk_id " handle
}
}
#hotif A_Cursor=="IBeam" && !WinActive("ahk_exe putty.exe")
^u UP::
{
A_Clipboard:=""
SendEvent "^c"
if(ClipWait(1))
{
A_Clipboard:=StrLower(A_Clipboard)
SendText A_Clipboard
}
else
TrayTip "无法操作", "control+c没有把内容存入剪贴板", 17
}
^+u UP::
{
A_Clipboard:=""
SendEvent "^c"
if(ClipWait(1))
{
A_Clipboard:=StrUpper(A_Clipboard)
SendText A_Clipboard
}
else
TrayTip "无法操作", "control+c没有把内容存入剪贴板", 17
}
#hotif
#hotif WinActive("ahk_exe PDFXCview.exe") && InStr(ControlGetClassNN(ControlGetFocus("A")), "Edit")==0
; DSUI:CmdEdit2
; Edit1
a::+^f
j::down
k::up
#hotif
#hotif WinActive("ahk_exe chrome.exe") || WinActive("ahk_exe vivaldi.exe")
^d::TrayTip "本脚本在Chrome里禁用了Control+d。如果要添加到收藏夹,请使用鼠标。", "屏蔽误操作", 1
#hotif
#hotif WinActive("ahk_exe devenv.exe")
$^;:: Send ";{Enter}"
#hotif
GetModuleFileNameEx( p_pid ) ; by shimanov - www.autohotkey.com/forum/viewtopic.php?t=9000
{
local h_process, name_size, result, name
h_process := DllCall( "OpenProcess", "uint", 0x10|0x400, "int", false, "uint", p_pid )
if ( h_process = 0 )
return
name_size:= 255
VarSetStrCapacity( &name, name_size )
result := DllCall( "psapi.dll\GetModuleFileNameExW", "uint", h_process, "uint", 0, "str", name, "uint", name_size )
DllCall( "CloseHandle", "uint", h_process )
return name
}