такие вещи лучше публично не обсуждать, выйдет очередное обновление и тютю...
А вообще зависит от того как у тебя реализовано. Например я только в начале работы скрипта определяю хэндл окна и дальше оперирую им. Вот я это определение хэндла и поправил.
даю подсказку: ("[CLASS:??]")
AutoItSetOption("WinTitleMatchMode", 2)
$handle = WinGetHandle("R2")
If @error Then
MsgBox(4096, "Error", "Окно не найдено!")
Else
MsgBox(0, "", $handle)
EndIf
function PlayProc(Code : integer; Undefined : WPARAM; P : LPARAM) : LRESULT; stdcall;
begin
if Code < 0 then
Result := CallNextHookEx(TheRecorder.HookHandle, Code, Undefined, P)
else begin
case Code of
HC_SKIP: begin
if TheRecorder.FStream.Position < TheRecorder.FStream.Size then begin
TheRecorder.FStream.Read(TheRecorder.EventMsg, SizeOf(TheRecorder.EventMsg));
TheRecorder.EventMsg.Time := TheRecorder.SpeedFactor*(TheRecorder.EventMsg.Time div 100);
TheRecorder.EventMsg.Time := TheRecorder.EventMsg.Time + TheRecorder.BaseTime;
end else begin //stop
TheRecorder.SetState(rsIdle);
if TheRecorder.Tag=777 then begin TheRecorder.DoPlay; exit; end;
TheRecorder.Tag:=TheRecorder.Tag-1;
if TheRecorder.Tag>0 then TheRecorder.DoPlay;
end;
end;
HC_GETNEXT: begin
Result := TheRecorder.EventMsg.Time - GetTickCount();
if Result < 0 then
Result := 0;
PEVENTMSG(P)^ := TheRecorder.EventMsg;
end;
else
PEVENTMSG(P)^ := TheRecorder.EventMsg;
Result := CallNextHookEx(TheRecorder.HookHandle, Code, Undefined, P)
end {case};
end {if};
end {PlayProc};
PEVENTMSG(P)^ := TheRecorder.EventMsg;
typedef struct tagEVENTMSG {
UINT message;
UINT paramL;
UINT paramH;
DWORD time;
HWND hwnd;
} EVENTMSG, *PEVENTMSG, *LPEVENTMSG;