Jump to content
Fivewin Brasil

FSIST E CHROME


REINALDAO

Recommended Posts

Chrome deve ser o navegador Padrão.


//-> Programa Para acionar o FSIST. By João Santos - 14/05/2019 - kapiabafwh@gmail.com. 
	#Include "FiveWin.Ch"
	Static oWnd
	Function Main()
	    LOCAL cFsist
	    cFsist := ( "https://www.fsist.com.br/" )
	    //-> Invisibilizo a Janela
    DEFINE WINDOW oWnd FROM -10, -10 TO -5, -5
	    ACTIVATE WINDOW oWnd ;
       ON INIT( ShellExecute(GetActiveWindow(),"open",'"'+cFsist+'"'), oWnd:End()  )
	Return Nil
	//-> Fim do programa


Link to comment
Share on other sites

OBRIGADO, FUNCIONOU MAS SERA QUE TEM COMO ABRI O CHROME ATRAVES DESTA ROTINA:

  Local hWnd, oOle, cUrl, oShell
  cUrl:="https://www.fsist.com.br"

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

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

   oOle:Navigate2(cUrl)

   hWnd:=oOle:hWnd
   ShowWindow(hWnd, 1)   // 2 para trabalhar minimixado, sem trauma para usuario
   BringWindowToTop(hWnd)

//   GetWndDefault():Minimize()

   While oOle:Busy
     syswait(.5)
   End
  CATCH
  END

  TRY
   oDoc := oOle:Document()
   oDoc:All:Item("chave",0):Value := cChave
   oDoc:All:Item("butconsulta",0):Focus()
   oDoc:All:Item("butconsulta",0):Click()
   syswait(5)
   oDoc:All:Item("linksemcert",0):Focus()
   oDoc:All:Item("linksemcert",0):Click()
   syswait(1)
  oShell := CreateObject( "WScript.Shell" )
  oShell:AppActivate("Internet Explorer")
// oShell:SetForegroundWindow()
   oShell:SendKeys("%{TAB}")  // tecla tab acionada p/foco do salvar
   oShell:SendKeys("%{S}")   // Alt+S salvar o xml

   oShell:SendKeys("%{TAB}")  // TAB de novo em caso falha do 1 tab
   oShell:SendKeys("%{S}")   // agora comece a rezar


//   oShell:SendKeys("{Enter}")
   syswait(3)
   oOle:Quit()
  CATCH
  END

 

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...