質問編集履歴

2

エラーメッセージの追加

2024/09/28 15:12

投稿

Aki1000
Aki1000

スコア78

test CHANGED
File without changes
test CHANGED
@@ -12,6 +12,11 @@
12
12
  とすれば、chromeをフロントに持ってくることが出来た。
13
13
 
14
14
  しかし、いつの間にかchromeを移動させる事が出来なくなっていた。
15
+ ###エラーメッセージ
16
+ 出ているエラーメッセージは
17
+ win32gui.SetForegroundWindow(hWnd)
18
+ pywintypes.error: (0, 'SetForegroundWindow', 'No error message is available')
19
+
15
20
  ###
16
21
 
17
22
  print(hWnd)とすると番号が取得できているので、
@@ -20,13 +25,13 @@
20
25
 
21
26
  しかし、
22
27
  win32gui.SetForegroundWindow(hWnd)
23
- 効果を発揮しない。
28
+ chromeに対て行うとエラーが出て実行されない。
24
29
  ###
25
30
  試しに
26
31
  hWnd = win32gui.FindWindow("IrfanView", None)
27
32
  win32gui.SetForegroundWindow(hWnd)
28
33
  とすると、IrfanViewのwindowsをフロントに移動することが出来た。
29
- だがchromeが出来ない
34
+ chrome以外のアプリに対しては効く
30
35
  ###
31
36
  また、試しに
32
37
  import ctypes

1

誤字修正

2024/09/28 12:45

投稿

Aki1000
Aki1000

スコア78

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- ###windows上で、で起動しているchromeをフロントに持っていきたい。
1
+ ###windows上で起動しているchromeをフロントに持っていきたい。
2
2
  使用する言語はpythonです。
3
3
 
4
4
  ### 前提