Search found 139 matches

by edk
Tue Sep 19, 2017 9:42 pm
Forum: General
Topic: TECLA F8 Y LASTKEY()
Replies: 9
Views: 309

Re: TECLA F8 Y LASTKEY()

La cuestión era que KEYBOARD() envía un carácter al buffer, pero LASTKEY() no queda actualizada. Al menos eso dice la teoría. P.D. Ejemplo de lo hecho: //Andes de DBEEDIT() //La variable "Control", controla si vengo de procedimiento o función If Control == 1 USE ALMACEN INDEX ALMACEN,ALMACENA SET O...
by edk
Sun Sep 17, 2017 8:41 am
Forum: HMG General Help
Topic: How to set exit code with errorlevel() ?
Replies: 10
Views: 582

Re: How to set exit code with errorlevel() ?

BeGeS wrote:
Sat Sep 16, 2017 10:08 pm
But... it does not work. :cry:

The .bat file always receives errorlevel = 0
What OS? Which version of HMG?
I tested on HMG 3.4.4 with WinXP 32 and both Win10 32bit/64bit, works fine.
by edk
Sat Sep 16, 2017 8:46 pm
Forum: HMG General Help
Topic: How to set exit code with errorlevel() ?
Replies: 10
Views: 582

Re: How to set exit code with errorlevel() ?

Hi, this sample works like a charm for me ;) : #include <hmg.ch> Function Main Local nErrorLevel:=0 DEFINE WINDOW main AT 144 , 426 WIDTH 163 HEIGHT 242 VIRTUAL WIDTH Nil VIRTUAL HEIGHT Nil TITLE "" ICON NIL MAIN CURSOR NIL ON INIT Nil ; ON RELEASE (nErrorLevel:=main.RadioGroup_1.value - 1, msgbox( ...
by edk
Mon Sep 11, 2017 2:04 pm
Forum: General
Topic: TECLA F8 Y LASTKEY()
Replies: 9
Views: 309

Re: TECLA F8 Y LASTKEY()

One more solution (more elegant): instead of "fake key" KEYBOARD CHR(250) you can use: _PushKey(VK_F8) Then only CASE LASTKEY()=-7 is enough. #include "hmg.ch" REQUEST HB_GT_WIN_DEFAULT Function Main CLS DO WHILE LASTKEY()#27 inkey(0) IF LASTKEY()=-6 //The F7 key emulates F8 _PushKey(VK_F8) inkey(0)...
by edk
Sun Sep 10, 2017 8:58 pm
Forum: General
Topic: TECLA F8 Y LASTKEY()
Replies: 9
Views: 309

Re: TECLA F8 Y LASTKEY()

In such cases, I use two codes to trigger an action, eg: Lastkey () = - 7 .OR. Lastkey () = 250
Then it works correctly when you press the f8 key and on: keyboard chr(250)
by edk
Fri Sep 08, 2017 5:42 pm
Forum: General
Topic: adjuntos correo .xls / .xlsx
Replies: 2
Views: 137

Re: adjuntos correo .xls / .xlsx

Try to send email via cdo.message:
http://www.hmgforum.com/viewtopic.php?f ... 497#p51497

I use this method to send emails with attached any type of files without problems.
by edk
Thu Sep 07, 2017 7:20 pm
Forum: Language Related
Topic: label at runtime
Replies: 15
Views: 376

Re: label at runtime

I hope this will be helpful: #include "hmg.ch" Function Main() Local i SELECT HPDFDOC "sample.pdf" PAPERLENGTH 300 PAPERWIDTH 300 LOG SET HPDFDOC ENCODING TO "WinAnsiEncoding" START HPDFDOC START HPDFPAGE @10,10 HPDFPRINT "Rotate Demo" HPDF_RotateText( 50, 80, "ABCxyz123", Nil, Nil, 90 ) HPDF_Rotate...
by edk
Thu Sep 07, 2017 6:06 am
Forum: Language Related
Topic: label at runtime
Replies: 15
Views: 376

Re: label at runtime

Maybe try use Claudio's bos taurus.
by edk
Wed Sep 06, 2017 9:34 pm
Forum: General
Topic: FILTRO
Replies: 7
Views: 301

Re: FILTRO

Try:

Code: Select all

SET FILTER TO LIKE( "*TUBO", Upper( concepto ) )
Or
SET FILTER TO "TUBO"$Upper( concepto )
Or
SET FILTER TO At( "TUBO", Upper( concepto ) )>0
 
by edk
Wed Sep 06, 2017 6:00 am
Forum: HMG General Help
Topic: Read data from usb port USB001
Replies: 10
Views: 542

Re: Read data from usb port USB001

edk need to read 4 readers direct by usb with the same name because they are of the same brand, so I need to read by name, id or usb port Indeed, but you must recognized what device is connected to usb port in some way. At the same class are reported keyboards, mouses, any hid devices like barcode ...