How Do I: Browser-Enable Amzi Prolog Program 
Author Message
 How Do I: Browser-Enable Amzi Prolog Program

Hi,
I'm a newbie and just testing the Amzi. How do I browser-enable an
Amzi Prolog .exe so that when a reader clicks the link the program
runs? Is there a way of compiling code into an applet?
Thanks much.
Resty


Tue, 03 Feb 2004 23:55:12 GMT  
 How Do I: Browser-Enable Amzi Prolog Program

Quote:
> Hi,
> I'm a newbie and just testing the Amzi. How do I browser-enable an
> Amzi Prolog .exe so that when a reader clicks the link the program
> runs? Is there a way of compiling code into an applet?
> Thanks much.
> Resty

Further to my last message, I now wonder if I misinterpreted your intention.

Do you mean that you want to put a hyperlink into a web page, not into a
program ?  A hyperlink that somehow runs a program instead of opening
another web page as usual?

I think that this can be done by writing a ".cgi" program, and making your
hyperlink call your cgi program.  This cgi program would have to reside on
your web server.  ( Most ISPs do not allow you to put a cgi program on their
servers, so you may need to obtain webspace elsewhere for your website. )

Amzi Prolog has some predicates for use in writing cgi programs.
You can write cgi programs using Amzi prolog.
I haven't done this yet, but it doesn't look too hard.

--
Martin Sondergaard,
London.



Wed, 04 Feb 2004 02:27:14 GMT  
 How Do I: Browser-Enable Amzi Prolog Program
Resty wrote :

Quote:
> Hi,
> I'm a newbie and just testing the Amzi. How do I browser-enable an
> Amzi Prolog .exe so that when a reader clicks the link the program
> runs? Is there a way of compiling code into an applet?
> Thanks much.
> Resty

Is sounds to me that you are trying to do something
that can't be done using standard prolog code.
You probably can't do it using Prolog.

With Amzi Prolog, you can combine prolog code with code written in another
language.  So you would use a different programming language to create a
window with clickable links on it.  Then you can make a clickable link run a
program.  If you want it to run your browser and make the browser open a
particular web page, you can do this by opening the URL of the web page.

In Delphi you would use a command like this :

Procedure OnLabel1Click( ... )
begin
    ShellExec( 'http://mywebpage.com/mysubpage.htm', ... ) ;
end ;

This causes the default browser to open on that web page
when "label1" is clicked on.

If you want to do fancy stuff like this, you need to write the program in a
language that gives you windows features ( like clickable labels, clickable
buttons, checkboxes, edit boxes, radio boxes, and pull-down menus ).
For example : Visual Basic, Delphi, Java, or C++.

I've written a program that has these features which is written in Delphi,
and which is closely linked with code written in Amzi Prolog.  Amzi Prolog
can be combined with any of the languages that I've just mentioned.

--
Martin Sondergaard,
London.



Wed, 04 Feb 2004 05:46:50 GMT  
 How Do I: Browser-Enable Amzi Prolog Program

Quote:

> Do you mean that you want to put a hyperlink into a web page, not into a
> program ?  A hyperlink that somehow runs a program instead of opening
> another web page as usual?

Yes, this is exactly what I'd like to do. And that program is a Prolog
program.

Quote:
> I think that this can be done by writing a ".cgi" program, and making your
> hyperlink call your cgi program.  This cgi program would have to reside on
> your web server.  ( Most ISPs do not allow you to put a cgi program on their
> servers, so you may need to obtain webspace elsewhere for your website. )

> Amzi Prolog has some predicates for use in writing cgi programs.
> You can write cgi programs using Amzi prolog.
> I haven't done this yet, but it doesn't look too hard.

I will look into the cgi feature of Amzi Prolog. Thanks much, Martin,
for your help. I appreciate it.

Best wishes,
Resty Cena

Quote:



> > Hi,
> > I'm a newbie and just testing the Amzi. How do I browser-enable an
> > Amzi Prolog .exe so that when a reader clicks the link the program
> > runs? Is there a way of compiling code into an applet?
> > Thanks much.
> > Resty

> Further to my last message, I now wonder if I misinterpreted your intention.

> Do you mean that you want to put a hyperlink into a web page, not into a
> program ?  A hyperlink that somehow runs a program instead of opening
> another web page as usual?

> I think that this can be done by writing a ".cgi" program, and making your
> hyperlink call your cgi program.  This cgi program would have to reside on
> your web server.  ( Most ISPs do not allow you to put a cgi program on their
> servers, so you may need to obtain webspace elsewhere for your website. )

> Amzi Prolog has some predicates for use in writing cgi programs.
> You can write cgi programs using Amzi prolog.
> I haven't done this yet, but it doesn't look too hard.



Thu, 05 Feb 2004 12:27:38 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Amzi Prolog versus LPA Prolog.

2. Amzi-Prolog vs. Visual Prolog

3. Searching Amzi Prolog with Smalltalk examples

4. Amzi Prolog - Newbie Question

5. Amzi Prolog - Warplan exame: extending it

6. Amzi Prolog for the Web

7. Amzi! Prolog

8. Random in Amzi Prolog

9. Amzi Prolog and SQL Server

10. How to use COM with Amzi Prolog

11. AMZI! Prolog and for/4

12. Problem with AMZI Prolog

 

 
Powered by phpBB® Forum Software