Skip to content

Commit

Permalink
Fix issue of "Failed to get offset of swf in DOM"
Browse files Browse the repository at this point in the history
  • Loading branch information
winston2tim committed Sep 15, 2018
1 parent 53e65c9 commit 7e65ec6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified EPP.rc
Binary file not shown.
6 changes: 4 additions & 2 deletions MainDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
#define FOCUS_ON_CAPTCHA ClickBrowser(740, 255);
#define SUBMIT_CAPTCHA ClickBrowser(550, 335);

#define DEFAULT_SWF_OFFSET {1, 170}

static const wchar_t *script_swf_left = L"$(\"#testsocket\").position().left - $(document).scrollLeft()";
static const wchar_t *script_swf_top = L"$(\"#testsocket\").position().top - $(document).scrollTop()";

static POINT GetSwfOffset(CComPtr<IWebBrowser2>& webBrowser)
{
POINT offset = {LONG_MAX, LONG_MAX};
POINT offset = DEFAULT_SWF_OFFSET;

CComQIPtr<IDispatch> spDisp;
CComQIPtr<IHTMLDocument2> pHTMLDoc;
Expand All @@ -30,7 +32,7 @@ static POINT GetSwfOffset(CComPtr<IWebBrowser2>& webBrowser)
}
else
{
LOGE << "Failed to get offset of swf in DOM";
LOGW << "Failed to get offset of swf in DOM";
}

return offset;
Expand Down

0 comments on commit 7e65ec6

Please # to comment.