From 172a4813676e3cb6ec8312f1b99cd57754950038 Mon Sep 17 00:00:00 2001 From: h677 Date: Sun, 29 Mar 2009 05:49:35 +0000 Subject: [PATCH] =?utf8?q?=E3=83=AA=E3=83=B3=E3=82=AF=E6=99=82=E5=8B=95?= =?utf8?q?=E4=BD=9C=E3=81=A7=E3=80=81=E3=83=96=E3=83=A9=E3=82=A6=E3=82=B6?= =?utf8?q?=E3=83=91=E3=82=B9=EF=BC=8B=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7?= =?utf8?q?=E3=83=B3=E3=81=A8=E6=8C=87=E5=AE=9A=E3=81=99=E3=82=8B=E3=81=A8?= =?utf8?q?=E5=8B=95=E4=BD=9C=E3=81=97=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C?= =?utf8?q?=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- GikoSystem.pas | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/GikoSystem.pas b/GikoSystem.pas index b992c5c..6541887 100644 --- a/GikoSystem.pas +++ b/GikoSystem.pas @@ -1654,14 +1654,45 @@ end; \param BrowserType ƒuƒ‰ƒEƒU‚̃^ƒCƒv(IE ‚©‚Ç‚¤‚©) } procedure TGikoSys.OpenBrowser(URL: string; BrowserType: TGikoBrowserType); +var + i, j : Integer; + path, arg : String; + params : TStringList; begin case BrowserType of gbtIE: HlinkNavigateString(nil, PWideChar(WideString(URL))); gbtUserApp, gbtAuto: - if (Setting.URLApp) and (FileExists(Setting.URLAppFile)) then - GikoSys.CreateProcess(Setting.URLAppFile, URL) - else + if (Setting.URLApp) then begin + if (FileExists(Setting.URLAppFile)) then begin + GikoSys.CreateProcess(Setting.URLAppFile, URL) + end else begin + // ‹N“®ƒpƒ‰ƒ[ƒ^•t‚«‘΍ô + path := ''; + params := TStringList.Create; + try + params.Delimiter := ' '; + params.DelimitedText := Setting.URLAppFile; + for i := 0 to params.Count - 1 do begin + path := TrimLeft(path + ' ' + params[i]); + if (FileExists(path)) then begin + arg := ''; + for j := i + 1 to params.Count - 1 do begin + arg := arg + ' ' + params[j]; + end; + break; + end; + end; + if i < params.Count then begin + GikoSys.CreateProcess(path, arg + ' ' + URL); + end else begin + HlinkNavigateString(nil, PWideChar(WideString(URL))); + end; + finally + params.Free; + end; + end; + end else HlinkNavigateString(nil, PWideChar(WideString(URL))); end; end; -- 2.11.0