Исправлен алгоритм поиска результата
This commit is contained in:
parent
d0d92cb074
commit
b15929a0ac
27
Compare.c
27
Compare.c
|
|
@ -80,8 +80,10 @@ static BOOL CALLBACK enum_wnd_proc(HWND hwnd, LPARAM lParam) {
|
||||||
#ifdef DEBUG_PRINTF
|
#ifdef DEBUG_PRINTF
|
||||||
printf("Static found!\n");
|
printf("Static found!\n");
|
||||||
#endif
|
#endif
|
||||||
char text[] = "-200.0%";
|
wchar_t text[_MAX_PATH];
|
||||||
SetWindowTextA(hwnd, (LPSTR)text);
|
wcscpy_s(text, _MAX_PATH, L" -200.0%");
|
||||||
|
|
||||||
|
SetWindowTextW(hwnd, (LPCWSTR)text);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -109,9 +111,20 @@ static BOOL CALLBACK enum_wnd_proc(HWND hwnd, LPARAM lParam) {
|
||||||
#ifdef DEBUG_PRINTF
|
#ifdef DEBUG_PRINTF
|
||||||
printf("Static found!\n");
|
printf("Static found!\n");
|
||||||
#endif
|
#endif
|
||||||
char text[_MAX_PATH];
|
wchar_t text[_MAX_PATH];
|
||||||
GetWindowTextA(hwnd, (LPSTR)text, _MAX_PATH);
|
|
||||||
printf("Similarity Score:%s\n", text);
|
for (int i = 0; i < 50; ++i) {
|
||||||
|
GetWindowTextW(hwnd, (LPCWSTR)text, _MAX_PATH);
|
||||||
|
|
||||||
|
if (wcscmp(text, L" -200.0%") == 0) {
|
||||||
|
Sleep(100);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("Similarity Score:%ls\n", text);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -187,9 +200,7 @@ int wmain(int argc, wchar_t* argv[], wchar_t* envp[]) {
|
||||||
|
|
||||||
compareStruct.regim = REGIM_COMPARE;
|
compareStruct.regim = REGIM_COMPARE;
|
||||||
EnumChildWindows(hwnd, enum_wnd_proc, (LPARAM)(&compareStruct));
|
EnumChildWindows(hwnd, enum_wnd_proc, (LPARAM)(&compareStruct));
|
||||||
|
|
||||||
Sleep(600);
|
|
||||||
|
|
||||||
compareStruct.regim = REGIM_RESULT;
|
compareStruct.regim = REGIM_RESULT;
|
||||||
EnumChildWindows(hwnd, enum_wnd_proc, (LPARAM)(&compareStruct));
|
EnumChildWindows(hwnd, enum_wnd_proc, (LPARAM)(&compareStruct));
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,7 +1,8 @@
|
||||||
Compare.c
|
Compare.c
|
||||||
|
C:\VC\Compare\Compare.c(117,39): warning C4090: функция: разные квалификаторы "const"
|
||||||
Создание кода
|
Создание кода
|
||||||
Создание кода завершено
|
Создание кода завершено
|
||||||
2 of 6 functions (33.3%) were compiled, the rest were copied from previous compilation.
|
0 of 6 functions ( 0.0%) were compiled, the rest were copied from previous compilation.
|
||||||
0 functions were new in current compilation
|
0 functions were new in current compilation
|
||||||
0 functions had inline decision re-evaluated but remain unchanged
|
0 functions had inline decision re-evaluated but remain unchanged
|
||||||
Compare.vcxproj -> C:\VC\Compare\Release\Compare.exe
|
Compare.vcxproj -> C:\VC\Compare\Release\Compare.exe
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue