🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by Alain Guérin Fri, 06 Jun 2003 14:53
[dialog] postkey in scripts
#125969
Author: Alain Guérin
Date: Fri, 06 Jun 2003 14:53
75 lines
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads