Macro vb a harbour.... Ayuda!

HMG en Español

Moderator: Rathinagiri

Post Reply
User avatar
Ismach
Posts: 94
Joined: Wed Nov 28, 2012 5:55 pm
DBs Used: DBF, mySQL, Mariadb, postgreSQL, Oracle, Db2, Interbase, Firebird, and SQLite
Location: Buenos Aires - Argentina
Been thanked: 7 times

Macro vb a harbour.... Ayuda!

Post by Ismach » Wed Apr 10, 2019 3:10 pm

:D Estimados quiero pasar a Harbour el codigo de esta macro, desde ya muchas gracias :D

Code: Select all

    Dim ie As Object
    Set ie = CreateObject("InternetExplorer.Application")
    With ie
        .navigate "https://w89-afip.dev.notify/ual_alloca5416_portal/ministerioeconomia/"
        .Visible = True
        apiShowWindow ie.hwnd, SW_MAXIMIZE
        ieBusy ie
        Dim env As Object, term As Object
        .Document.Forms(0).all("edTerminal").Value = terminalcode
        .Document.Forms(0).submit

    End With
asi no funciona:

Code: Select all

#include "FileIO.ch"
#include "hmg.ch"

FUNCTION Main()

    PUBLIC ie   As Object
    PUBLIC env  As Object
    PUBLIC term As Object

    ie := CreateObject("InternetExplorer.Application")
    ie:navigate( "https://w89-afip.dev.notify/ual_alloca5416_portal/ministerioeconomia/" )
    ie:Visible = True
    apiShowWindow( ie:hwnd, SW_MAXIMIZE )
    ie:Busy( ie )
    ie:Document:Forms(0):all("edTerminal"):Value := terminalcode
    ie:Document:Forms(0):submit()

RETURN NIL


User avatar
danielmaximiliano
Posts: 2136
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 154 times
Been thanked: 23 times
Contact:

Post by danielmaximiliano » Thu Apr 11, 2019 1:49 pm

Hola IsMach, mira el ejemplo http://hmgforum.com/viewtopic.php?f=24&t=5892


No puedo responderte más sencillo ya que estoy en celular
Puedes enviarme pv
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

User avatar
Ismach
Posts: 94
Joined: Wed Nov 28, 2012 5:55 pm
DBs Used: DBF, mySQL, Mariadb, postgreSQL, Oracle, Db2, Interbase, Firebird, and SQLite
Location: Buenos Aires - Argentina
Been thanked: 7 times

Post by Ismach » Thu Apr 11, 2019 5:52 pm

Esto funciona de diez... lo que trataba de hacer es escribir en una caja de texto del HMTL el numero de terminal en forma automatica, para que el usuario no tuviera que ponerla manualmente:

Code: Select all

#include "FileIO.ch"
#include "hmg.ch"

FUNCTION Main()

    PUBLIC ie   As Object
    PUBLIC CodTerm      := "F099"

    IF !ReadTerminal()
        QUIT
    ENDIF

    ie := CreateObject("InternetExplorer.Application")
    ie:navigate( "https://w89-afip.dev.notify/ual_alloca5416_portal/ministerioeconomia/" )
    ie:Visible = True
    Do While ( ie:ReadyState != 4 )
         DoEvents()
    ENDDO
    ShowWindow( ie:hwnd, SW_MAXIMIZ

    ie:Document:Forms(0):all("edTerminal"):Value := CodTerm
    ie:Document:Title := "Ud esta Udando la Terminal -->  [ " + CodTerm  + "  ]"
    inkey(2)
    ie:Document:Forms[0]:submit()

RETURN NIL

Post Reply