From YYpBD's MediaWiki
[팁] 열려였는 전체 Explore 에서 URL 가져오기.
안녕하세여.. 타락임다..^^
전에 어느 님이(벌써 치매인듯..ㅠㅠ) 올린글을 보구 맹글었슴다. 보구 필요한 대루 수정한것 뿐 임다..
열렸있는 전체 Explore 에서 URL 을 가져오는 검미다. 당근, Frame 안에서 링크걸린 것은 URL 못가져 옴다. 나중에 필요하게 되서 맹글면 올리겠슴다. 할수 있는데, 바뻐서..ㅠㅠ
uses
SHDocVw, ComObj;
procedure OKGetURL(AStrings: TStrings);
function WebBrowserCheck(const Webb: IWebBrowser2): Boolean;
var
WebV: Variant;
Buf: string;
begin
WebV := Webb;
Result := False;
if Assigned(Webb) then
try
Buf := WebV.Document.URL;
Result := True;
except;
end;
end;
var
Count, i: integer;
mShellWindow: IShellWindows;
Webb: IWebBrowser2;
WebV: Variant;
begin
mShellWindow := CreateComObject(CLASS_ShellWindows) as IShellWindows;
Count := mShellWindow.Count;
for i := 0 to Count - 1 do
if WebBrowserCheck(mShellWindow.Item(i) as IWebBrowser2) then
try
Webb := IWebBrowser2(mShellWindow.Item(i));
WebV := Webb;
AStrings.Add(WebV.Document.URL);
except;
end;
end;
즐푸하세여..
타락천사..^^