🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by Big Ben Mon, 17 Jan 2005 15:30
[dialog] problem with script and clipboard
#160933
Author: Big Ben
Date: Mon, 17 Jan 2005 15:30
60 lines
2588 bytes
Hi,

Here a little script to get the name of a group :

Program TEST;

uses
   Forms,
   StdCtrls;
const
   MB_OK = 0;
var
   myForm: TForm;
   myMemo: TMemo;      
    
FUNCTION EmptyClipboard:boolean; external 'EmptyClipboard@user32.dll
stdcall';
FUNCTION OpenClipboard(hWndNewOwner: INTEGER):boolean; external
'OpenClipboard@user32.dll stdcall';
FUNCTION CloseClipboard:boolean; external 'CloseClipboard@user32.dll
stdcall';
FUNCTION MessageBox(hWnd: Cardinal; lpText, lpCaption: PChar; uType:
longword): Integer; external 'MessageBoxA@user32.dll stdcall';

Begin                            

   myForm := tForm.Create(nil);
   myForm.width:=800;
   myForm.Height:=600;
   myMemo := tMemo.Create(myForm);
   myMemo.Parent := myForm;
   myMemo.Width := myForm.width;
   myMemo.Height := myForm.Height;

   // clear clipboard              
   OpenClipboard(Application.Handle);
   EmptyClipboard;
   CloseClipboard;
   MyMemo.Clear;
   
   // select one line on newsgroup panel	
   ADo('NewGroupPane');        
   ADo('Copy');                      

   // and the result
   MyMemo.PasteFromClipboard;                         
   messageBox(0, Mymemo.lines.Strings[0],'result',MB_OK);      

End.

It's ok on WindowsXP but on Windows2000 I get some extra characters like
'@6' instead of 'news.software.readers' for example. I think clipboard
format is not good but how can I retrieve the text of clipboard ?

(sorry for my bad english)

-- 
Cordialement,
Ben.
Re: [dialog] problem with script and clipboard
#160975
Author: Alain GUERIN
Date: Mon, 17 Jan 2005 22:07
26 lines
2078 bytes
Hello,


On Mon, 17 Jan 2005 16:30:21 +0100, Big Ben wrote:

[...]

>    // and the result
>    MyMemo.PasteFromClipboard;                         
>    messageBox(0, Mymemo.lines.Strings[0],'result',MB_OK);      

> End.

> It's ok on WindowsXP but on Windows2000 I get some extra characters like
> '@6' instead of 'news.software.readers' for example. I think clipboard
> format is not good but how can I retrieve the text of clipboard ?


Did you try to copy from Memo into a string and use the writeln function
to see what you have, just to be sure that is not MessageBox that has a
side effect.

As I have no Windows 2000 to test, it's only a supposition .

-- 
A.G.
Re: [dialog] problem with script and clipboard
#161009
Author: Big Ben
Date: Tue, 18 Jan 2005 07:56
14 lines
1488 bytes
Le lundi 17 janvier 2005 à 23:07, Alain GUERIN a écrit:

> Did you try to copy from Memo into a string and use the writeln function
> to see what you have, just to be sure that is not MessageBox that has a
> side effect.
> 
> As I have no Windows 2000 to test, it's only a supposition .

Same problem with a string and writeln.

-- 
Cordialement,
Ben.
Re: [dialog] problem with script and clipboard
#161016
Author: Alain GUERIN
Date: Tue, 18 Jan 2005 11:11
34 lines
2501 bytes
Hello,


On Tue, 18 Jan 2005 08:56:53 +0100, Big Ben wrote:

> Le lundi 17 janvier 2005 à 23:07, Alain GUERIN a écrit:

>> Did you try to copy from Memo into a string and use the writeln function
>> to see what you have, just to be sure that is not MessageBox that has a
>> side effect.

>> As I have no Windows 2000 to test, it's only a supposition .

> Same problem with a string and writeln.

OK. In fact, it does not work properly even with Windows Me.

And Program AddGroupNameToTextFile; does not run correctly too while it
did in the past :-/

(http://a.guerin.free.fr/dialog/scripts/addgroupnametotextfile.zip)

I tried with version 36 and it fails in that version too.

So 2 hypothesis : 

I am wrong when I believe that AddGroupNameToTextFile; worked in the past
time (but I found group names in the file when the present run adds only
garbagge) and nobody tried this script (or said it was buggy) 

Something changed with Dialog that has a side effect.

-- 
A.G.
Re: [dialog] problem with script and clipboard
#161020
Author: Big Ben
Date: Tue, 18 Jan 2005 12:13
11 lines
1489 bytes
Le mardi 18 janvier 2005 à 12:11, Alain GUERIN a écrit:

> (http://a.guerin.free.fr/dialog/scripts/addgroupnametotextfile.zip)

Doesn't run correctly too with windows 2000.
Tonight I try with windows XP.

-- 
Cordialement,
Ben.
Re: [dialog] problem with script and clipboard
#161038
Author: Patrick Benicchio
Date: Tue, 18 Jan 2005 19:06
14 lines
1723 bytes
Le mardi 18 janvier 2005 à 13:13, Big Ben a écrit:

> Le mardi 18 janvier 2005 à 12:11, Alain GUERIN a écrit:
> 
>> (http://a.guerin.free.fr/dialog/scripts/addgroupnametotextfile.zip)
> 
> Doesn't run correctly too with windows 2000.
> Tonight I try with windows XP.

It's ok with windows XP !

-- 
Cordialement,
Ben.
Re: [dialog] problem with script and clipboard
#161040
Author: Big Ben
Date: Tue, 18 Jan 2005 19:08
12 lines
1753 bytes
> Le mardi 18 janvier 2005 à 12:11, Alain GUERIN a écrit:
> 
>> (http://a.guerin.free.fr/dialog/scripts/addgroupnametotextfile.zip)
> 
> Doesn't run correctly too with windows 2000.
> Tonight I try with windows XP.

It's ok with windows XP !

-- 
Cordialement,
Ben.
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