質問編集履歴
3
UI Automation画像の追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
2
UI Automation画像の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -185,6 +185,10 @@
|
|
185
185
|
|
186
186
|
```
|
187
187
|
|
188
|
+
### 追記:2019/08/26 16:13
|
189
|
+
|
190
|
+

|
191
|
+
|
188
192
|
### 開発環境
|
189
193
|
Windows10 x64
|
190
194
|
Office Excel 2013 x86
|
1
報告漏れ
title
CHANGED
File without changes
|
body
CHANGED
@@ -161,6 +161,30 @@
|
|
161
161
|
何かヒントになるようなことでも構いませんので、お教えいただけるとありがたいです。
|
162
162
|
どうか宜しくお願いいたします。
|
163
163
|
|
164
|
+
### 追記:2019/08/22 10:50
|
165
|
+
|
166
|
+
お伝えし忘れていました。
|
167
|
+
以下部分のコードは、UI Automationとは別の方法でボタンを押そうとしている処理です。
|
168
|
+
ウインドウハンドルは取得できていますが、ボタンが取得できていません。
|
169
|
+
変数hButtonの中身を見ると、0が代入されていました。
|
170
|
+
|
171
|
+
```VBA
|
172
|
+
hwnd = FindWindow("Credential Dialog Xaml Host", "Windows セキュリティ")
|
173
|
+
Set uiAuto = New CUIAutomation
|
174
|
+
Set elmIE = uiAuto.ElementFromHandle(hwnd)
|
175
|
+
|
176
|
+
'''Set objDocument = IEDOMFromhWnd(hwnd)
|
177
|
+
'ソースの確認
|
178
|
+
''''Debug.Print objDocument.body.innerHTML
|
179
|
+
|
180
|
+
Dim hButton As Long
|
181
|
+
hButton = FindWindowEx(hwnd, 0&, "Credential Dialog Xaml Host", "OK")
|
182
|
+
|
183
|
+
Call SendMessage(hButton, &H6, 1, 0&) 'ボタンをアクティブにする
|
184
|
+
Call SendMessage(hButton, &HF5, 0, 0&) 'ボタンをクリックする
|
185
|
+
|
186
|
+
```
|
187
|
+
|
164
188
|
### 開発環境
|
165
189
|
Windows10 x64
|
166
190
|
Office Excel 2013 x86
|