From starred@tiscalinet.it Sat Sep 29 11:19:28 2001
Received: from smtp1.libero.it (smtp1.libero.it [193.70.192.51])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f8T9JSv13946
	for <prolog@swi.psy.uva.nl>; Sat, 29 Sep 2001 11:19:28 +0200 (MET DST)
Received: from tiscalinet.it (151.24.141.203) by smtp1.libero.it (6.0.024)
        id 3BB04696001399FD; Sat, 29 Sep 2001 11:18:57 +0200
Message-ID: <3BB5925B.1060503@tiscalinet.it>
Date: Sat, 29 Sep 2001 11:20:27 +0200
From: Armando Stellato <starred@tiscalinet.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1
X-Accept-Language: en-us
MIME-Version: 1.0
To: Jonathan D Johnston <jdjohnston2@juno.com>
CC: prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] fail to consult if I click on the file.
References: <20010928.191522.-430743.0.jdjohnston2@juno.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Thank to you, however I reinstalled SWI-prolog for the third time and it 
did function! (while the second installation i made some days ago 
reported the same problem...)
Better not to investigate in such misteries....
Thank you anyway, i'll copy the code, may be it'll be useful in the 
future...
Armando

Jonathan D Johnston wrote:

> Hi, Armando & Jan. May I offer another diagnosis?
> 
> [Earlier e-mails reordered]
> [Armando Stellato]
> 
>>Hi, I've installed SWI Prolog on Win 98SE and Win2000.
>>On the first one, it automatically consults the files that I click 
>>with the mouse.
>>On win2000, it fails to consult saying: 'Impossible to find file
>>"<PATH>\file" or one of its components, verify correctness of path 
>>and availability of libraries'.
>>
> 
> I get a very similar error message on Win98se if I try to execute a
> DDE command and there is no DDE server for that command.
> 
> [Armando Stellato]
> 
>>This is the configuration associated to the pl files (for the
>>operation consult):
>>
> [snip] 
> 
>>use DDE (checked)
>>
> [snip]
>  
> [Jan Wielemaker]
> 
>>Was the installation fine? I.e. did the installation error described
>>here recently trick you?  If installation was fine, what exactly is
>>registered with the filetype "Prolog Source", associated with .PL
>>(or whatever you choose)?
>>
> 
> As of SWI-Prolog 4.0.1 (couldn't say as far as the newer versions),
> plwin does *not* automatically register itself as a DDE server.  In
> order to use the context menu commands (consult & edit), plwin must
> have been previously started & code executed to register itself as a
> DDE server.  Therefore, I have the following code in my pl.ini: 
> 
> <Code>
> :- dde_register_service(prolog(control, Message), do_msg(Message)).
> 
> do_msg(Msg) :- back_to_fwd(Msg,Msg1), atom_to_term(Msg1,T,_), call(T).
> 
> % Substitute a forward slash (/) for each backslash (\).
> % Makes the path easier to work with within SWI-Prolog.
> back_to_fwd([],[]).
> back_to_fwd(Ain, Aout) :-
>     sub_atom(Ain, Start, 1, Len, '\\'),
>     sub_atom(Ain, 0, Start, _, Aleft),
>     Rem is Start+1,
>     sub_atom(Ain, Rem, Len, _, ArightIn),
>     back_to_fwd(ArightIn, ArightOut),
>     concat_atom([Aleft, ArightOut], '/', Aout).
> back_to_fwd(A, A).
> </Code>
> 
> Not the prettiest Prolog code, but it does the job.  With this in
> place, it's easy to select multiple .pl files in Windows Explorer to
> be used with one plwin listener.  Double-click on the first file,
> which launches plwin, implicitly consults pl.ini (which registers
> plwin as a DDE server), & consults the selected file (No DDE needed).
> For any other .pl files, simply right-click on each & select 'consult'
> from the context menu.
> 
> HTH,
> Jonathan D Johnston
> ________________________________________________________________
> GET INTERNET ACCESS FROM JUNO!
> Juno offers FREE or PREMIUM Internet access for less!
> Join Juno today!  For your FREE software, visit:
> http://dl.www.juno.com/get/web/.
> 
> 
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
> 
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
> 
> or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe"
> (without the quotes) and *no* message body.
> 
> ** An ARCHIVE of this list is maintained at
> 
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
> 
> 
> 


