Article View: news.software.readers
Article #125969[dialog] postkey in scripts
From: Alain Guérin
Date: Fri, 06 Jun 2003 14:53
Date: Fri, 06 Jun 2003 14:53
75 lines
3654 bytes
3654 bytes
Hello,
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:
<3ee0ab03$0$5395$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!syros.belnet.be!news.belnet.be!uni-erlangen.de!news-nue1.dfn.de!newsfeed.r-kom.de!newsfeed.freenet.de!213.253.16.105.MISMATCH!mephistopheles.news.clara.net!news.clara.net!usenet-fr.net!proxad.net!feeder2-1.proxad.net!news3-2.free.fr!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <3ee0ab03$0$5395$626a54ce@news.free.fr>
Subject: [dialog] postkey in scripts
Date: Fri, 6 Jun 2003 16:53:55 +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!syros.belnet.be!news.belnet.be!uni-erlangen.de!news-nue1.dfn.de!newsfeed.r-kom.de!newsfeed.freenet.de!213.253.16.105.MISMATCH!mephistopheles.news.clara.net!news.clara.net!usenet-fr.net!proxad.net!feeder2-1.proxad.net!news3-2.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: 74
NNTP-Posting-Date: 06 Jun 2003 16:53:56 MEST
NNTP-Posting-Host: 62.147.221.254
X-Trace: 1054911236 news3-2.free.fr 5395 62.147.221.254:1158
X-Complaints-To: abuse@proxad.net