Bonjour je cherche à automatiser le remplissage des items d'une dialogue dont je vous ai fait un extract plus bas en utilisant l'api getdlgctrlid.
Cela marche si l'application est lancée et ne se ferme pas ce qui n'est pas acceptable en mode prod. Le pb provient du fait que l'identifiant de certaines zones change à chaque lancement de l'application donc comment faire pour le localiser d'une manière unique. Les lignes sont identifiées en rouge (id/ctrl en rouge gras)
Merci de votre aide
PS: dev sous codeblocks en c/c++ avec des compilateurs (gcc/cbuilder/ms/..)
1° lancement
WINDOW FOUND: hwnd=0x1C0BB2 title=Interface] getwindowprocessname=D:\Program Files (x86)\flux\interface\interface.exe
1 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x1c0bb2:Interface] -> [0x441686:] <WindowsForms10.Window.8.app.0.1983833:WindowsForms10.Window.8.app.0.1983833> (id=4462214) coord: 3351,915 -> 3822,1060
2 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x3f16de:Auth] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=4134622) coord: 3355,915 -> 3818,952
3 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x1d1572:Code] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=1906034) coord: 3355,952 -> 3450,986
4 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x270e34sw ] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=2559540) coord: 3355,986 -> 3452,1003
5 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x170554:CANCEL] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=1508692) coord: 3355,1020 -> 3455,1048
6 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x1f0620:pipo1] <WindowsForms10.EDIT.app.0.1983833:WindowsForms10.EDIT.app.0.1983833> (id=2033184) coord: 3463,956 -> 3742,978
7 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x160740:pipo2] <WindowsForms10.EDIT.app.0.1983833:WindowsForms10.EDIT.app.0.1983833> (id=1443648) coord: 3463,990 -> 3742,1012
8 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x1607c6:OK] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=1443782) coord: 3719,1020 -> 3818,1048
9 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x630bda:Option A] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=6491098) coord: 3750,956 -> 3805,977
10 =[(pid:tid) 0x5f8(interface.exe):0xd68] -> [0x441686:] -> [0x1d0b30:Option B] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=1903408) coord: 3750,990 -> 3805,1011
2° lancement
WINDOW FOUND: hwnd=0x2D126A title=Interface] getwindowprocessname=D:\Program Files (x86)\flux\interface\interface.exe
1 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x2d126a:Interface] -> [0x1d07f2:] <WindowsForms10.Window.8.app.0.1983833:WindowsForms10.Window.8.app.0.1983833> (id=1902578) coord: 1444,927 -> 1915,1072
2 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x1c0b78:Auth] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=1837944) coord: 1448,927 -> 1911,964
3 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x2e1578:Code] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=3020152) coord: 1448,964 -> 1543,998
4 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x2015e4sw ] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=2102756) coord: 1448,998 -> 1545,1015
5 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x1b055c:CANCEL] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=1770844) coord: 1448,1032 -> 1548,1060
6 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x1a0b32:] <WindowsForms10.EDIT.app.0.1983833:WindowsForms10.EDIT.app.0.1983833> (id=1706802) coord: 1556,968 -> 1835,990
7 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x290e34:] <WindowsForms10.EDIT.app.0.1983833:WindowsForms10.EDIT.app.0.1983833> (id=2690612) coord: 1556,1002 -> 1835,1024
8 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x7a1012:Ok] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=7999506) coord: 1812,1032 -> 1911,1060
9 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x80580:Option A] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=525696) coord: 1843,968 -> 1898,989
10 =[(pid:tid) 0x2390(interface.exe):0x148c] -> [0x1d07f2:] -> [0x260558:Option B] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=2491736) coord: 1843,1002 -> 1898,1023
3° lancement
WINDOW FOUND: hwnd=0x190FFA title=Interface] getwindowprocessname=D:\Program Files (x86)\flux\interface\interface.exe
1 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x190ffa:Interface] -> [0x1b05c2:] <WindowsForms10.Window.8.app.0.1983833:WindowsForms10.Window.8.app.0.1983833> (id=1770946) coordwind: 1448,929 -> 1919,1074 coordcli: 1448,929 -> 1919,1074
2 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x111620:Auth] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=1119776) coordwind: 1452,929 -> 1915,966 coordcli: 1452,929 -> 1915,966
3 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x120ade:Code] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=1182430) coordwind: 1452,966 -> 1547,1000 coordcli: 1452,966 -> 1547,1000
4 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x41015csw] <WindowsForms10.STATIC.app.0.1983833:WindowsForms10.STATIC.app.0.1983833> (id=4260188) coordwind: 1452,1000 -> 1549,1017 coordcli: 1452,1000 -> 1549,1017
5 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x4416b8:CANCEL] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=4462264) coordwind: 1452,1034 -> 1552,1062 coordcli: 1452,1034 -> 1552,1062
6 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x1609aa:] <WindowsForms10.EDIT.app.0.1983833:WindowsForms10.EDIT.app.0.1983833> (id=1444266) coordwind: 1560,970 -> 1839,992 coordcli: 1562,972 -> 1837,990
7 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x24076c:] <WindowsForms10.EDIT.app.0.1983833:WindowsForms10.EDIT.app.0.1983833> (id=2361196) coordwind: 1560,1004 -> 1839,1026 coordcli: 1562,1006 -> 1837,1024
8 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x210554:OK] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=2164052) coordwind: 1816,1034 -> 1915,1062 coordcli: 1816,1034 -> 1915,1062
9 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x450688:Option A] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=4523656) coordwind: 1847,970 -> 1902,991 coordcli: 1847,970 -> 1902,991
10 =[(pid:tid) 0x1604(interface.exe):0x239c] -> [0x1b05c2:] -> [0x350fe2:Option B] <WindowsForms10.BUTTON.app.0.1983833:WindowsForms10.BUTTON.app.0.1983833> (id=3477474) coordwind: 1847,1004 -> 1902,1025 coordcli: 1847,1004 -> 1902,1025
[/SIZE][/SIZE]
Partager