Article View: news.software.readers
Article #126127[Dialog] Postkey in scripts
From: Alain Guérin
Date: Mon, 09 Jun 2003 06:49
Date: Mon, 09 Jun 2003 06:49
79 lines
3765 bytes
3765 bytes
Hello,
I send this post a second time as I got no answer and I saw that I put
[dialog] in place of [Dialog] in the subject of my first post. Il the
filters are case sensitive, that could be one reason why nobody saw it ;-)
Here after is my first script : it is intented to open a post creation
window with a sentence at the begining of the post.
(May be there is a way without script, but I did not find it ;-)
I found how to send letter keys to the windows (even a space and digits ;-)
but no punctuation signs are sent.
When I send 'Bonjour,', I get 'Bonjour' with no comma.
My script:
Program CreerMessage;
procedure PutLine(ALine : String);
var
Letter : Byte;
BEGIN
FOR Letter := 1 to Length(ALine) DO
BEGIN
IF ((ALine[Letter] >= 'A') AND (ALine[Letter] <= 'Z')) THEN
PostKey( Ord(ALine[Letter]), true, false,false,
false,false,false,false,false)
ELSE IF (ALine[Letter] >= 'a') AND (ALine[Letter] <= 'z') then
PostKey( Ord(ALine[Letter])-(Ord('a')-ord('A')), false,
false,false, false,false,false,false,false)
ELSE
PostKey( Ord(ALine[Letter]), false, false,false,
false,false,false,false,false)
END;
{send cariage return}
PostKey( 13, true, false,false,false,false,false,false,false);
END;
Procedure OpenNewPost;
begin
ADo('NewPostToNewsgroup');
{ PostKey( key: Word; Shift, Alt, Ctrl, Left, Right, Middle,
Double,specialkey: Boolean); }
{shift-tab x 2 -> edit window}
PostKey( 9, true, false,false,false,false,false,false,false);
PostKey( 9, true, false,false,false,false,false,false,false);
PutLine ('Bonjour,');
end;
Begin
OpenNewPost
End.
It also seems that following coding is not allowed:
CASE ALine[Letter] OF
'A'..'Z':
PostKey( Ord(ALine[Letter]), true, false,false,
false,false,false,false,false);
'a'..'z':
PostKey( Ord(ALine[Letter])-(Ord('a')-ord('A')), false,
false,false, false,false,false,false,false);
ELSE
PostKey( Ord(ALine[Letter]), false, false,false,
false,false,false,false,false);
END;
nor this one :
IF (ALine[Letter] IN ['A'..'Z']) THEN ...
Thanks for your comments
--
A.G.
Technical Details
Message-ID:
<3ee42df7$0$12450$626a54ce@news.free.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!feeder2-1.proxad.net!news2-1.free.fr!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <3ee42df7$0$12450$626a54ce@news.free.fr>
Subject: [Dialog] Postkey in scripts
Date: Mon, 9 Jun 2003 08:49:20 +0200
From: Alain Guérin <news40@pas-de-pub-alain-guerin.com.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!feeder2-1.proxad.net!news2-1.free.fr!not-for-mail
Newsgroups: news.software.readers
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Reply-To: news40@alain-guerin.com
Organization: NA
Archive: no
X-Face: GOI#J$,onz-'Uz6us^h!d&!=/wSO@@FxWc?}1i_p@/E%ViONg.TD9>V7VA4(S/j%&mb%4uD ,=8(bmy`{t`AM[~^Y#8*]ZJ;{y2%EU,B'%$9[qEDa)B{/P4+eTD5E4{Un+XE$|RWd(=aNN%(,yP,cG =k=7dqQ"euLbBTVKLCV-Ql@aFEdzF1F6GU4b}qG%JPDjL'~T2;-03s=7s5[QUH@>GQ!CLJ@S{%K[m1 $j`EsD+M&'5>>&-'tfiB0p',<4e0SN,4NDZ:f._qI9vVW0[r\~yk7{.GmY^cN*&/=5qjcH&Q;$
User-Agent: 40tude_Dialog/2.0.5.1
Lines: 78
NNTP-Posting-Date: 09 Jun 2003 08:49:27 MEST
NNTP-Posting-Host: 62.147.220.145
X-Trace: 1055141367 news2-1.free.fr 12450 62.147.220.145:1264
X-Complaints-To: abuse@proxad.net