Article View: news.software.readers
Article #157622Re: [Dialog] Script for sending string and Message-ID to browser?
From: MLC
Date: Fri, 29 Oct 2004 09:02
Date: Fri, 29 Oct 2004 09:02
119 lines
4423 bytes
4423 bytes
_Scott Marquardt_, giovedรฌ 28/ott/2004:
> I'm wanting to send an URL to Internet Explorer and navigate accordingly.
> The URL I'd like to send would be a string, plus the message-id of the
> currently selected message:
>
> mid <DNnn7.18524$151.1610065@bgtnsc05-news.ops.worldnet.att.net>
>
> The reason this string would be effective for my purposes is that I use a
> search shortcut method in IE for retrieving google archived messages using
> message-id headers. The following is a .reg export that shows the values
> that make this effective (if you save this as a .reg file and merge it into
> your registry, typing "mid " in the address bar, followed by a message-id
> value, will lead to the archive copy at google).
>
> -<snip>-
>
> Windows Registry Editor Version 5.00
>
> [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\mid]
> @="http://groups.google.com/groups?oe=UTF-8&as_umsgid=%s&lr=&num=30&hl=en"
> " "="+"
> "+"="%2B"
> "%"="%25"
> "&"="%26"
>
> -<snip>-
>
> Does anyone with scripting experience in Dialog have a clue how to open a
> new IE window and navigate it to a string + header value for the selected
> message in Dialog?
Hi Scott,
I didn't add that "mid" key in my registry, however I've written a script
that opens your default browser in the Google page for the Message-ID of the
selected message in Dialog. I hope it can fit your wishes :-)
Program GoogleMid;
uses Forms, StdCtrls;
const
MsgIDHeader = 'Message-ID: ';
query = 'http://groups.google.com/groups?oe=UTF-8&lr=&num=30&hl=en&as_umsgid=';
var
myForm: TForm;
myMemo: TMemo;
MsgID, url: string;
AreHidden: boolean;
Procedure GetMsgBody(var LocMemo: tMemo);
begin
LocMemo.Clear;
ADo('ArticlePane');
ADo('SelectAll');
Ado('Copy');
LocMemo.PasteFromClipboard;
end;
Function GetMsgID(var LocMemo: tMemo): string;
var
i: integer;
begin
i := 0;
result := '';
while (i < LocMemo.Lines.count-1) and (Result = '') do
begin
if Pos(MsgIDHeader,LocMemo.lines.Strings[i]) = 1 then
Result := LocMemo.lines.Strings[i]
else
i := i+1;
end; //while
result := copy(result, length(MsgIDHeader)+1, Length(result));
end;
Function AreHeadersHidden(var LocMemo: tMemo): boolean;
var i: integer;
begin
result := true;
if LocMemo.Lines.count > 10 then
begin
i := 0;
while (i < LocMemo.Lines.count -1) and result do
begin
i := i+1;
result := Pos('Newsgroups: ', LocMemo.Lines.strings[i])=0;
end; //while
end; //if
end;
Procedure BuildmyContainers;
begin
myMemo := tMemo.Create(myForm);
myMemo.Parent := myForm;
myMemo.Width := Application.Mainform.width;
end;
Begin
myForm := tForm.Create(nil);
lockdisplay;
try
BuildmyContainers;
GetMsgBody(myMemo);
AreHidden := AreHeadersHidden(myMemo);
if AreHidden then ADo('ShowHeaders');
GetMsgBody(myMemo);
MsgID := GetMsgID(myMemo);
if AreHidden then Ado('ShowHeaders');
finally
myForm.free;
end;
url := query + MsgID;
FileExecute(0,url,'','','',0,0);
unlockdisplay;
End.
--
Maria Luisa C - 29/10/2004 10.52.10
Technical Details
Message-ID:
<3ch3rlxugt1l$.dlg@ID-187316.user.uni-berlin.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!not-for-mailReferences:
<z6nillcqj00g$.dlg@marquardts.org>Show Full Headers
Complete Article Headers
Message-ID: <3ch3rlxugt1l$.dlg@ID-187316.user.uni-berlin.de>
Subject: Re: [Dialog] Script for sending string and Message-ID to browser?
Date: Fri, 29 Oct 2004 11:02:32 +0200
From: MLC <marialuisacNOSPAM@gmail.com>
References: <z6nillcqj00g$.dlg@marquardts.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!not-for-mail
Newsgroups: news.software.readers
Organization: none
Lines: 119
Reply-To: marialuisac@gmail.com
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de 7jXIPfELthavlF0K17zE8g6kAOOwIhNFQqyDHSkzIwqkfHBOmm
X-Now-Playing: Winamp is not active
User-Agent: 40tude_Dialog/2.0.14.3it (b8ab43cd.110.458)
X-Coord: Lat 44.317 N, Long 11.417 E
X-face: '4\%,O5x).F~gp\lJim~>rQ@ggNl=ucLRL~UFiRN5ADNs%v(0;
[D{/K6Wm)'@}f*4k8)<.q
:h+}\Rt\w|`K#U,C,T7d*\zA@VT{7BZ_3x'r5R#Q]H_Jzn~|AcJ{6C>BTbilCDO
X-URL: http://fido.altervista.org/index.php