Jump to content
Fivewin Brasil

Preencher formulario da receita federal


marcioe

Recommended Posts

Function test4()
  Local hWnd, oOle, cData, cUrl:="https://www.receita.fazenda.gov.br/Aplicacoes/SSL/ATCTA/cpf/ImpressaoComprovante/ConsultaImpressao.asp"

  TRY
   oOle:= CreateObject("InternetExplorer.Application")

   oOle:Visible    := .t.
   oOle:ToolBar    := .f.
   oOle:StatusBar  := .f.
   oOle:MenuBar    := .f.

   oOle:Navigate(cUrl)

   hWnd:=oOle:hWnd
   ShowWindow(hWnd, 1 )
   BringWindowToTop(hWnd)

   While oOle:Busy
     syswait(.5)
   End

  CATCH
  END

  cData := "01112017"

  TRY
   oOle := oOle:Document()
      oOle:All:Item("txtCPF",0):Value := "99999999999"
      oOle:All:Item("txtNome",0):Value := "AAAAAAAAAANOME"
      oOle:All:Item("txtDataNascimento",0):Value := cData
      oOle:All:Item("txtNomeMae",0):Value := "AAAAAAAAAAA"
      oOle:All:Item("txtTitulo",0):Value := "9999999999999"
      oOle:All:Item("Enviar",0):Focus()
      oOle:All:Item("Enviar",0):Click()
  CATCH
  END

  oOle := Nil

Return nil

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...