LEX1
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Не интересно. sabio Сие делается подобным образом: Код: function FindOpera(Wnd: HWnd; Res: PInteger): Boolean; stdcall; var Nm, Cs: Array[0..255] of Char; gwt, gcn: Integer; begin Result := True; gwt := GetWindowText(Wnd, Nm, 255); gcn := GetClassName(Wnd, Cs, 255); if isWindow(Wnd) and IsWindowVisible(Wnd) and (gwt <> 0) and (gcn <> 0) then Result := (Cs <> 'OpWindow') or (Nm = ''); if not Result then Res^ := Wnd; end; ... EnumWindows(@FindOpera, Integer(@OpWnd)); If OpWnd = 0 Then begin MessageBox( 0, PChar('The window of Opera is not found!'), 'Error', 48 ); Halt; end; GetWindowText(OpWnd, Title, 255); NameOfWin := Title; operaPos := PosR(' - Opera', NameOfWin); If operaPos > 0 Then SetLength(NameOfWin, operaPos-1); NameFile := UrlUnescape(CorrectName(NameOfWin)); If NameFile = '' Then NameFile := 'untitled'; | Добавлено: sabio Кстати, можно сделать и на js: Код: javascript function(){ var link=location.href; var title=document.title || document.getElementsByTagName('title')[0] && document.getElementsByTagName('title')[0].text; location.href='data:text/url;charset=UTF-8,'+encodeURIComponent('[InternetShortcut]\r\nURL='+link+'\r\n'+title); })(); | И vbs-кой или батником переименовывать получившийся файл. |