Page 1 of 1

how to ?

PostPosted: Mon Jul 06, 2020 1:18 pm
by fdaniele
excuse me
i am new on this forum and want to learn MH

there is a guide "how to" for begin ?

ok to study examples but a text semi-complete is better :)

thanks very much

Daniele

Re: how to ?

PostPosted: Mon Jul 06, 2020 1:51 pm
by Antonio Linares
Daniele,

https://github.com/FiveTechSoft/mod_harbour/wiki

1. what is it mod_harbour

mod_harbour is a module extension for Apache that supports Harbour PRGs (and HRBs) same as Apache supports PHPs

2. How to install mod_harbour

https://github.com/FiveTechSoft/mod_harbour/blob/master/windows/readme.md
https://github.com/FiveTechSoft/mod_harbour/wiki/mod_harbour-setup-for-Windows-Xampp

3. Functions provided my mod_harbour:

https://github.com/FiveTechSoft/mod_harbour/wiki/Functions-provided-by-the-mod-Harbour

4. Using DBFs from the server:

https://github.com/FiveTechSoft/mod_harbour/wiki/Using-DBFs-from-the-server

5. Using MySQL from the server:

https://github.com/FiveTechSoft/mod_harbour/wiki/Create-a-MySQL-database,-table-and-some-records

6. Troubleshoting

https://github.com/FiveTechSoft/mod_harbour/wiki/What-to-check-if-the-mod-is-not-working

7. How to use your own libraries:

https://github.com/FiveTechSoft/mod_harbour/wiki/How-to-include-your-own-libs-or-third-party-libs-into-mod_harbour

8. How to activate the rewrite module:

https://github.com/FiveTechSoft/mod_harbour/wiki/How-to-activate-the-rewrite-module

9. Tables and form designers:

https://github.com/FiveTechSoft/mod_harbour/wiki/Tables-&-Form-Designers

10. MVC: Model View Controller, the right way to use mod_harbour:

Model (data), View (user interface), Controller (requests and results administrator) is the right way to develop web apps.
You can use the Mercury library for mod_harbour that implements MVC:

Re: how to ?

PostPosted: Tue Jul 07, 2020 7:00 am
by fdaniele
Thanks mr. Linares

in a small test i see that in browser work also the serial port !! Wonderfull
lComOk := com_Open(1, nBuff_size) // Open port

IF ! com_Open(1, 1000)
? "Com non presente"
else
? "Com1 presente"
endif

reply correctly !!

Little question:
is it possible to print overcoming browser restrictions?
I'll explain
with a button on the web page it is possible to print directly to a printer,
perhaps not the default one, without going through the printer choice of the browser?

thanks for your work

Daniele

Re: how to ?

PostPosted: Tue Jul 07, 2020 7:06 am
by Antonio Linares
Daniele,

Please try:

SET PRINTER on | OFF | <xlToggle>
SET PRINTER TO [<xcDevice> | <xcFile> [ADDITIVE]]

then use, QOut( "Hello world" )

Re: how to ?

PostPosted: Tue Jul 07, 2020 7:28 am
by fdaniele
wow !! to a file work !!!

was it so easy ?!!????
:oops:

unbelievable !

thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks

:D

but .... how to send to an usb/network printer ?


Daniele

Re: how to ?

PostPosted: Tue Jul 07, 2020 7:34 am
by Antonio Linares

Re: how to ?

PostPosted: Wed Jul 08, 2020 12:55 pm
by fdaniele
Dear mr. Antonio, dear all friends

in my little tests i found that is possible to use the printer and serial port of the server
but is possible to use serial or print directaly to the serial/printer of the pc client ?

in other words, print or otherwise by skipping the browser's security settings ?

thanks in advance

Daniele

Re: how to ?

PostPosted: Thu Jul 09, 2020 5:14 pm
by fdaniele
No replay?
Please...
:D

Re: how to ?

PostPosted: Fri Jul 10, 2020 6:38 am
by Carles
fdaniele,

can you print a web page? You can use for example window.print (). See https://www.w3schools.com/jsref/met_win_print.asp

Re: how to ?

PostPosted: Fri Jul 10, 2020 7:49 am
by fdaniele
so easy ?!?

woooowwwww

correction:
thanks Mr. Carles

anyway the preview of the print is showed 8)
i want to print directaly (like a POS)

Thanks anyway mr. Carles, really appreciate your help :D

Daniele