うまく動かないよ。スキルあるお兄さん教えてください procedure TMainWnd.TextPopupOpenSelectionURLsClick(Sender: TObject); procedure SetJpegForm(Form: TJpegForm; URI: string); begin Form.URL := CutImenu(URI); Form.extBrowserSpecified := Config.extBrowserSpecified; Form.extBrowserPath := Config.extBrowserPath; if Config.netUseProxy then begin Form.ProxyServer := Config.netProxyServer; Form.ProxyPort := Config.netProxyPort; end; Form.SetThumbnailSize(Config.optThumbnailSize); Form.WindowFit := Config.optWindowFit; end; var viewItem: TViewItem; URI:String; URIs:TStringList; i:Integer; Form: TJpegForm; {$IFDEF IE} textRange: OleVariant; {$ENDIF} begin viewItem := GetActiveView; if viewItem = nil then exit; {$IFDEF IE} textRange := OleVariant(viewItem.browser.Document as IHTMLDocument2).selection; textRange := textRange.createRange(); if textRange.text = '' then Exit; URIs:=TStringList.Create; if Config.optUseViewer and TJpegForm.ExtCheck(textRange.text,URIs); //UImageViewer.ExtractURLs(textRange.text,URIs); {$ELSE} if viewItem.browser.Selection='' then exit; URIs:=TStringList.Create; if Config.optUseViewer and TJpegForm.ExtCheck(viewItem.browser.Selection,URIs); //UImageViewer.ExtractURLs(viewItem.browser.Selection,URIs); {$ENDIF} for i:=0 to URIs.Count-1 do begin URI:=UImageViewer.ProofURL(URIs[i]); if URI<>'' then if ImageViewConfig.OpenImagesOnly then begin if ImageViewConfig.ExamFileExt(URI) then ImageForm.GetImage(URI,viewItem); end else begin if not NavigateIntoView(URI, gtOther) then if not ImageForm.GetImage(URI,viewItem) then OpenByBrowser(URI); end; end; end;
procedure TWriteForm.BrowserStatusTextChange(Sender:TObject; AStatusText:string); begin if AStatusText<>'' then {184} //ちょっと見るでメール欄をポップアップ if chotto and (AnsiStartsStr('mailto:', AStatusText)) then (中略) procedure TWriteForm.BeforeNavigate(const URL: String; var Cancel: WordBool); {184} //相対アドレスはブラウザにまかせてます。 こんなのでいいんだろうか・・・。 (中略) {184} if chotto then URI := chottoRelative(URL) //184 (中略) {$ENDIF} end;