質問編集履歴

5

追記したコードの説明を追記

2021/06/30 14:44

投稿

slimat
slimat

スコア57

test CHANGED
File without changes
test CHANGED
@@ -56,7 +56,9 @@
56
56
 
57
57
 
58
58
 
59
+ ーーーー追記①(2021/6/30)ーーーー
60
+
59
- ーーー追記①ーーーー
61
+ 現在のコドの状態です.
60
62
 
61
63
  ```AHK
62
64
 

4

現時点でのコードの追記

2021/06/30 14:44

投稿

slimat
slimat

スコア57

test CHANGED
File without changes
test CHANGED
@@ -53,3 +53,65 @@
53
53
  環境 OS : Windows10, AutoHotKey : Version 1.1.33.02
54
54
 
55
55
  よろしくお願いいたします.
56
+
57
+
58
+
59
+ ーーーー追記①ーーーー
60
+
61
+ ```AHK
62
+
63
+ #Persistent
64
+
65
+
66
+
67
+ #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
68
+
69
+ ; #Warn ; Enable warnings to assist with detecting common errors.
70
+
71
+ SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
72
+
73
+ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
74
+
75
+
76
+
77
+ myFunc := RegisterCallback("textSelectedHandler")
78
+
79
+
80
+
81
+ myHook := DllCall("SetWinEventHook"
82
+
83
+ , "UInt", 0x8014 ; eventMin : EVENT_SYSTEM_FOREGROUND
84
+
85
+ , "UInt", 0x8014 ; eventMax : EVENT_SYSTEM_FOREGROUND
86
+
87
+ , "UInt", 0 ; hModule : self
88
+
89
+ , "UInt", myFunc ; hWinEventProc :
90
+
91
+ , "UInt", 0 ; idProcess : All process
92
+
93
+ , "UInt", 0 ; idThread : All threads
94
+
95
+ , "UInt", 0x0003 ; dwFlags : WINEVENT_SKIPOWNTHREAD | WINEVENT_SKIPOWNPROCESS
96
+
97
+ , "UInt")
98
+
99
+
100
+
101
+ textSelectedHandler() { ; 引数を全消ししても動いた
102
+
103
+ WinActive("A") ; sets last found window
104
+
105
+ ControlGetFocus, ctrl
106
+
107
+ if (RegExMatch(ctrl, "A)Edit\d+")) { ; attempt copying without clipboard
108
+
109
+ ControlGet, text, Selected,, %ctrl%
110
+
111
+ clipboard := text
112
+
113
+ }
114
+
115
+ }
116
+
117
+ ```

3

タグの追加

2021/06/30 14:33

投稿

slimat
slimat

スコア57

test CHANGED
File without changes
test CHANGED
File without changes

2

タグの追加

2021/01/20 10:05

投稿

slimat
slimat

スコア57

test CHANGED
File without changes
test CHANGED
File without changes

1

初心者マークの追加と

2021/01/20 06:05

投稿

slimat
slimat

スコア57

test CHANGED
File without changes
test CHANGED
@@ -50,6 +50,6 @@
50
50
 
51
51
  ```
52
52
 
53
- 環境 : OS : Windows10, AutoHotKey : Version 1.1.33.02
53
+ 環境 OS : Windows10, AutoHotKey : Version 1.1.33.02
54
54
 
55
55
  よろしくお願いいたします.