windows - Getting "resource is busy" error, how to fix it? -
i got below code, believe producing "resource busy" , since in timer keep on repeating. use find out website trying automate telling me , act accordingly.
anyone can tell me how fix code or debug it?
procedure timerautooktimer(sender: tobject); const messagefromwebpage = 'message webpage'; var wnd: hwnd; begin wnd := findwindow(nil, messagefromwebpage); // 'message webpage'; if wnd <> 0 begin memo1.lines.clear; enumchildwindows(wnd, @enumchildrenproc, integer(memo1.lines)); if pos('not possible', memo1.lines.text)>0 sendmessage(application.activeformhandle, wm_command, id_ok, 0); if pos('the webpage viewing trying close window.', memo1.lines.text)>0 sendmessage(application.activeformhandle, wm_command, id_no, 0); end; end; 
Comments
Post a Comment