๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #126163

Re: [Dialog] Postkey in scripts

#126163
From: Alain GUERIN
Date: Tue, 10 Jun 2003 00:12
69 lines
3963 bytes
On Tue, 10 Jun 2003 00:27:54 +0200, Alain Gu๏ฟฝrin wrote:

> Thanks for your answer and particularly for the Wizard.
> In fact, I believed that the value was a virtual key value ( that is more
> international than key code ;-)

And here after is the fixed code, adapted from Juergen script:

Program NewPost;

function VkKeyScan( ch: Char ): SmallInt; 
         external 'VkKeyScanA@user32.dll stdcall';  
procedure PutLine(ALine : String);

VAR
   Letter : Byte;
   KeyCode : Word;
   VKINFO : SmallInt;                                                
   VKState : SmallInt;
   BEGIN
      FOR Letter := 1 TO Length(Aline) DO
   	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                                                       
        BEGIN     
           VKInfo := VkKeyScan(ALine[Letter]);
           IF VKInfo > -1 THEN
           BEGIN          
           	KeyCode := VKInfo and $FF;
           	vkState := ( VKInfo and $FF00 ) shr 8; // shift state
{   PostKey( key: Word; Shift, Alt, Ctrl, Left, Right, Middle,
Double,specialkey: Boolean); }
                PostKey(KeyCode, VKState and $01 = $01, VKState and $04 =
$04,VKState and $02 = $02, 
           	                    false,false,false,false,false)
        END
   END;                                                        
   PostKey( 13, true, false,false,false,false,false,false,false);                       
END;

Procedure OpenNewPost;

BEGIN
   ADo('NewPostToNewsgroup');
{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 ('Hello,'); 
END;

BEGIN                
   OpenNewPost
END.


The next thing I would like, is a way to "read" the news group name in the
message creation window so I can adapt my prompt to each particular group
(at least have 'Bonjour,' or 'Hello,' following the common group language ).

I also saw that the textfile functions are bugged so I will not build a text
file with a particular prompt for each group ;-(

-- 
A.G.
Technical Details
Message-ID: <3ee52269$0$12457$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!headwall.stanford.edu!newshub.sdsu.edu!elnk-pas-nf2!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!feeder2-1.proxad.net!news2-1.free.fr!not-for-mail
References: <3ee42df7$0$12450$626a54ce@news.free.fr> <1v0b6a1fkg6ee.dlg@ndqf.elbiah.de> <3ee509ed$0$12468$626a54ce@news.free.fr>

Show Full Headers
Complete Article Headers
Message-ID: <3ee52269$0$12457$626a54ce@news.free.fr>
Subject: Re: [Dialog] Postkey in scripts
Date: Tue, 10 Jun 2003 02:12:17 +0200
From: Alain GUERIN <news40@spamout-alain-guerin.com.invalid>
References: <3ee42df7$0$12450$626a54ce@news.free.fr> <1v0b6a1fkg6ee.dlg@ndqf.elbiah.de> <3ee509ed$0$12468$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!headwall.stanford.edu!newshub.sdsu.edu!elnk-pas-nf2!newsfeed.earthlink.net!newsfeed.news2me.com!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="iso-8859-15"
Content-Transfer-Encoding: 8bit
Reply-To: news40@alain-guerin.com
Organization: NA
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: 68
NNTP-Posting-Date: 10 Jun 2003 02:12:25 MEST
NNTP-Posting-Host: 81.57.20.30
X-Trace: 1055203945 news2-1.free.fr 12457 81.57.20.30:1671
X-Complaints-To: abuse@proxad.net