Jump to content

vidaLL

Active Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by vidaLL

  1. The file was empty. Now is working. Tks Water.
  2. Here : C:Program Files (x86)AutoIt3Include
  3. This one.... _OL_AddressListMemberGet.au3
  4. Water, any script that i run returns with this message : undefined function (example : _OL_AddressListMemberGet) Is this a problem of my Scite ?
  5. Tks again water
  6. Hi all. I would like to know if there is any way to extract all emails from Outlook that were answered and if necessary, put filters . E.g : I do not want to bring e-mail of the person X.
  7. I dont know exactly what i did ,but is working : HotKeySet("{ESC}", "Terminate") #include <WindowsConstants.au3> #include <Excel.au3> #include <IE.au3> #include <Array.au3> Local $sFilePath1 = @ScriptDir & "\icms_importacao.xls" ;Global $sExcelFile = @DesktopDir & "\Pasta2.xls" ; <== Add the name of the Excel file here and your User Local $oExcel = _ExcelBookOpen($sFilePath1) Local $aExcelData = _ExcelReadSheetToArray($oExcel);$oExcel $oIE = _IECreate() _IENavigate($oIE, "https://www.fazenda.sp.gov.br/simp"); https://webhomolog.fazenda.sp.gov.br/simp For $iRow = 1 To $aExcelData[0][0] $o_form = _IEFormGetObjByName($oIE, "form1") $o_txtCpf = _IEFormElementGetObjByName($o_form, "txtCpf") $o_txtNumDoc = _IEFormElementGetObjByName($o_form, "txtNumDoc") $o_btnConsultar = _IEFormElementGetObjByName($o_form, "btnConsultar") _IEFormElementSetValue($o_txtCpf, $aExcelData[$iRow][1]) _IEFormElementSetValue($o_txtNumDoc, $aExcelData[$iRow][2]) $o_btnConsultar.click _IELoadWait($oIE) $o_form = _IEFormGetObjByName($oIE, "_ctl0") $o_btnContinuar = _IEFormElementGetObjByName($o_form, "btnContinuar") If IsObj($o_btnContinuar) Then $o_btnContinuar.click _IELoadWait($oIE) EndIf If Not IsObj($o_btnContinuar) Then $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGare = _IEFormElementGetObjByName($o_form, "btnGare") $o_btnGare.click _IELoadWait($oIE) EndIf ; Captar objetos dos documentos $o_form = _IEFormGetObjByName($oIE, "Form1") $o_txtObs = _IEFormElementGetObjByName($o_form, "txtObs") $o_txtDataPagto = _IEFormElementGetObjByName($o_form, "txtDataPagto") $o_txtReceita = _IEFormElementGetObjByName($o_form, "txtReceita") _IEFormElementSetValue($o_txtObs, $aExcelData[$iRow][3]) _IEFormElementSetValue($o_txtDataPagto, $aExcelData[$iRow][4]) _IEFormElementSetValue($o_txtReceita, $aExcelData[$iRow][5]) $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnCalculoProd = _IEFormElementGetObjByName($o_form, "btnCalculoProd") $o_btnCalculoProd.click _IELoadWait($oIE) $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGera = _IEFormElementGetObjByName($o_form, "btnGera") $o_btnGera.click _IELoadWait($oIE) ;Fecha pop up WinWaitActive("https://www.fazenda.sp.gov.br/simp/guias", "") WinKill("https://www.fazenda.sp.gov.br/simp/guias", "") ; Captar objetos dos documentos $o_form = _IEFormGetObjByName($oIE, "Form1");_ctl0 $o_gareLink = _IEFormElementGetObjByName($o_form, "gareLink") $o_btnSair = _IEFormElementGetObjByName($o_form, "btnSair") ;Download PDF $oLinks = _IELinkGetCollection ($oIE) For $oLink In $oLinks If StringInStr ( $oLink.href, '.pdf' ) <> 0 And StringInStr ( $oLink.href, '.asc' ) = 0 Then ConsoleWrite ( "Link Inf : " & $oLink.innertext & ' : ' & $oLink.href & @Crlf ) $_LastReleaseLink = $oLink.href EndIf Next $o_btnSair.click _IELoadWait($oIE) $_Name = StringReplace ( _GetFullNameByUrl ( $_LastReleaseLink ), '%20', ' ' ) InetGet ( $_LastReleaseLink, @ScriptDir & '\' & $_Name, 1 ) RunWait ( @ScriptDir & '\' & $_Name & ' /S' ) Next Func _GetFullNameByUrl ( $_FileUrl ) $_FileName = StringSplit ( $_FileUrl, '/' ) If Not @error Then Return $_FileName[$_FileName[0]] Else Return 0 EndIf Endfunc ;RegWrite($sKey, 'PopupMgr', 'REG_SZ', 'no') ; Turn off Func Terminate() Exit 0 EndFunc ;==>Terminate Thanks you all.
  8. Guys, I finally got it, but now my loop stopped working: ( HotKeySet("{ESC}", "Terminate") #include <WindowsConstants.au3> #include <Excel.au3> #include <IE.au3> #include <Array.au3> Local $sFilePath1 = @DesktopDir & "\icms_importacao.xls" ;Global $sExcelFile = @DesktopDir & "\Pasta2.xls" ; <== Add the name of the Excel file here and your User Local $oExcel = _ExcelBookOpen($sFilePath1) Local $aExcelData = _ExcelReadSheetToArray($oExcel);$oExcel $oIE = _IECreate() _IENavigate($oIE, "https://www.fazenda.sp.gov.br/simp"); https://webhomolog.fazenda.sp.gov.br/simp For $iRow = 1 To $aExcelData[0][0] $o_form = _IEFormGetObjByName($oIE, "form1") $o_txtCpf = _IEFormElementGetObjByName($o_form, "txtCpf") $o_txtNumDoc = _IEFormElementGetObjByName($o_form, "txtNumDoc") $O_btnConsultar = _IEFormElementGetObjByName($o_form, "btnConsultar") _IEFormElementSetValue($o_txtCpf, $aExcelData[$iRow][1]) _IEFormElementSetValue($o_txtNumDoc, $aExcelData[$iRow][2]) $o_btnConsultar.click _IELoadWait($oIE) $o_form = _IEFormGetObjByName($oIE, "_ctl0") $o_btnContinuar = _IEFormElementGetObjByName($o_form, "btnContinuar") If IsObj($o_btnContinuar) Then $o_btnContinuar.click _IELoadWait($oIE) EndIf If Not IsObj($o_btnContinuar) Then $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGare = _IEFormElementGetObjByName($o_form, "btnGare") $o_btnGare.click _IELoadWait($oIE) EndIf ; Captar objetos dos documentos $o_form = _IEFormGetObjByName($oIE, "Form1") $o_txtObs = _IEFormElementGetObjByName($o_form, "txtObs") $o_txtDataPagto = _IEFormElementGetObjByName($o_form, "txtDataPagto") $o_txtReceita = _IEFormElementGetObjByName($o_form, "txtReceita") _IEFormElementSetValue($o_txtObs, $aExcelData[$iRow][3]) _IEFormElementSetValue($o_txtDataPagto, $aExcelData[$iRow][4]) _IEFormElementSetValue($o_txtReceita, $aExcelData[$iRow][5]) $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnCalculoProd = _IEFormElementGetObjByName($o_form, "btnCalculoProd") $o_btnCalculoProd.click _IELoadWait($oIE) $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGera = _IEFormElementGetObjByName($o_form, "btnGera") $o_btnGera.click _IELoadWait($oIE) ;Fecha pop up WinWaitActive("https://www.fazenda.sp.gov.br/simp/guias", "") WinKill("https://www.fazenda.sp.gov.br/simp/guias", "") ; Captar objetos dos documentos $o_form = _IEFormGetObjByName($oIE, "Form1");_ctl0 $o_gareLink = _IEFormElementGetObjByName($o_form, "gareLink") $o_btnSair = _IEFormElementGetObjByName($o_form, "btnSair") ;Download PDF #include <Array.au3> $oLinks = _IELinkGetCollection ($oIE) For $oLink In $oLinks If StringInStr ( $oLink.href, '.pdf' ) <> 0 And StringInStr ( $oLink.href, '.asc' ) = 0 Then ConsoleWrite ( "Link Inf : " & $oLink.innertext & ' : ' & $oLink.href & @Crlf ) $_LastReleaseLink = $oLink.href EndIf Next ;_IEQuit ( $oIE ) $_Name = StringReplace ( _GetFullNameByUrl ( $_LastReleaseLink ), '%20', ' ' ) InetGet ( $_LastReleaseLink, @ScriptDir & '\' & $_Name, 1 ) RunWait ( @ScriptDir & '\' & $_Name & ' /S' ) Next Func _GetFullNameByUrl ( $_FileUrl ) $_FileName = StringSplit ( $_FileUrl, '/' ) If Not @error Then Return $_FileName[$_FileName[0]] Else Return 0 EndIf $o_btnSair.click _IELoadWait($oIE) Endfunc ;RegWrite($sKey, 'PopupMgr', 'REG_SZ', 'no') ; Turn off Func Terminate() Exit 0 EndFunc ;==>Terminate
  9. I Don't know if is clear my difficulty. Follow example ... just put it on desktop and run Gare.au3 icms_importacao.xls
  10. Dale, unfortunately i can't imagine what are you talking about I have this href : <A id=gareLink href="guias/0_1314891920_0_020_DI_120-0_True_True.pdf">aqui</A> Im taking as example these scripts : Local $hDownload = InetGet("http://www.autoitscript.com/autoit3/files/beta/update.dat", @Desktopdir & "\update.dat", 1, 1) Do Sleep(250) Until InetGetInfo($hDownload, 2) ; Check if the download is complete. Local $nBytes = InetGetInfo($hDownload, 0) InetClose($hDownload) ; Close the handle to release resources. MsgBox(0, "", "Bytes read: " & $nBytes) or just : InetGet("http://www.autoitscript.com", @TempDir & "autoitscript.html", 1 Thanks
  11. Ok. But , i have one case which href is <A id=gareLink href="guias/0_1302141343_0_005_DI_120-0_True_True.pdf">aqui</A> , but next time, tjhis part "0_1302141343_0_005_DI_120-0_True_True" will have another name .... Any idea ?
  12. Hello guys.... I have a problem with this script. I can't download using href because each time that i generate a document , the href will take the name of the document. So it varies by number of document. Dim $sKey = 'HKCU\Software\Microsoft\Internet Explorer\New Windows' RegWrite($sKEy, 'PopupMgr', 'REG_SZ', 'yes') ; Turn on HotKeySet("{ESC}", "Terminate") #include <WindowsConstants.au3> #include <Excel.au3> #include <IE.au3> Local $sFilePath1 = @DesktopDir & "\Pasta2.xls" ;Global $sExcelFile = @DesktopDir & "\Pasta2.xls" ; <== Add the name of the Excel file here and your User Local $oExcel = _ExcelBookOpen($sFilePath1) Global $aExcelData = _ExcelReadSheetToArray($oExcel);$oExcel $oIE = _IECreate() _IENavigate($oIE, "https://www.fazenda.sp.gov.br/simp"); https://webhomolog.fazenda.sp.gov.br/simp ;=======================>FROM HERE For $iRow = 1 To $aExcelData[0][0] $o_form = _IEFormGetObjByName($oIE, "form1") $o_txtCpf = _IEFormElementGetObjByName($o_form, "txtCpf") $o_txtNumDoc = _IEFormElementGetObjByName($o_form, "txtNumDoc") $O_btnConsultar = _IEFormElementGetObjByName($o_form, "btnConsultar") _IEFormElementSetValue($o_txtCpf, $aExcelData[$iRow][1]) _IEFormElementSetValue($o_txtNumDoc, $aExcelData[$iRow][2]) $o_btnConsultar.click _IELoadWait($oIE) $o_form = _IEFormGetObjByName($oIE, "_ctl0") $o_btnContinuar = _IEFormElementGetObjByName($o_form, "btnContinuar") If IsObj($o_btnContinuar) Then $o_btnContinuar.click _IELoadWait($oIE) EndIf If Not IsObj($o_btnContinuar) Then $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGare = _IEFormElementGetObjByName($o_form, "btnGare") $o_btnGare.click _IELoadWait($oIE) EndIf ;$o_form = _IEFormGetObjByName($oIE, "Form1") ;$o_btnGare = _IEFormElementGetObjByName($o_form, "btnGare") ;$o_btnGare.click ;_IELoadWait($oIE) ; Doc informations $o_form = _IEFormGetObjByName($oIE, "Form1") $o_txtObs = _IEFormElementGetObjByName($o_form, "txtObs") $o_txtDataPagto = _IEFormElementGetObjByName($o_form, "txtDataPagto") $o_txtReceita = _IEFormElementGetObjByName($o_form, "txtReceita") _IEFormElementSetValue($o_txtObs, $aExcelData[$iRow][3]) _IEFormElementSetValue($o_txtDataPagto, $aExcelData[$iRow][4]) _IEFormElementSetValue($o_txtReceita, $aExcelData[$iRow][5]) $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnCalculoProd = _IEFormElementGetObjByName($o_form, "btnCalculoProd") $o_btnCalculoProd.click _IELoadWait($oIE) $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGera = _IEFormElementGetObjByName($o_form, "btnGera") $o_btnGera.click _IELoadWait($oIE) WinWaitActive("https://www.fazenda.sp.gov.br/simp/guias", "") WinKill("https://www.fazenda.sp.gov.br/simp/guias", "") ;====DOWNLOAD MODE "SAVE AS"===== ;Sleep(6000) ;Send("{CTRLDOWN}") ;Send("{SHIFTDOWN}") ;Send("s") ;Send("{CTRLUP}") ;Send("{SHIFTUP}") ;Sleep(6000) ;WinWaitActive("Save as", "Save") ;Send("{ALTDOWN}") ;Send("s") ;Send("{ALTUP}") ;Sleep(1500) ;Send("!{F4}") ;Sleep(1500) $o_form = _IEFormGetObjByName($oIE, "Form1");_ctl0 $o_btnSair = _IEFormElementGetObjByName($o_form, "btnSair") $o_btnSair.click _IELoadWait($oIE) Next RegWrite($sKey, 'PopupMgr', 'REG_SZ', 'no') ; Turn off Func Terminate() Exit 0 EndFunc ;==>Terminate I created a process in autoit that generate almost 200 registries. Each record generates a PDF and PDF's are the ones that I want to save on the desktop by e.g SUMMARY: I need to know if there is any way to download it in background ? Thanks you all.
  13. Solved my friend. thanks for your help. Local $sFilePath1 = @DesktopDir & "\Pasta2.xls" ;Global $sExcelFile = @DesktopDir & "\Pasta2.xls" ; <== Add the name of the Excel file here and your User Local $oExcel = _ExcelBookOpen($sFilePath1)
  14. Hello guys, I need a help with the follow command : #include <WindowsConstants.au3> #include <Excel.au3> #include <IE.au3> Func _Main() Local $Input_CurrentUserName Global $sExcelFile = "C:\Users\ "& @UserName"\Desktop\teste.xls" ; <== Add the name of the Excel file here and your User Global $oExcel = _ExcelBookOpen($sExcelFile) Global $aExcelData = _ExcelReadSheetToArray($oExcel);$oExcel $oIE = _IECreate() _IENavigate($oIE, "site here"); EndFunc I have the need to open a file in the desktop which have a fixed name. My problem is that each computer has a different code User. I would like this script to work on any computer. Grateful to all.
  15. I cant see it clearly.... Func InetGet ("??????",@DocumentsCommonDir,0,0)
  16. <A id=gareLink href="guias/0_1302170653_0_010_DI_120-0_True_True.pdf">aqui</A> Whats the problem : the number 0_1302170653_0_010 will change each time that i generate a new Document.
  17. Hello all.. Is there any way to save a document through the object? E.g $o_form = _IEFormGetObjByName($oIE, "Form1");Form1_ctl0 $o_btnSair = _IEFormElementGetObjByName($o_form, "btnSair") $o_gareLink = _IEFormElementGetObjByName($o_form, "gareLink") The "gareLink" is the object. I tryied InetGet but didnt work to this case, because each time will be a different name of the document (link to download)
  18. water, a simples question : is there a way to use a Object from a webpage to "save target as" ?
  19. Im your Fan man... Thanks very much Works like a charm .
  20. Sorry.. just correcting my previous message : is not transcribing the read information from next line.
  21. No... Its runs normally but its not reading all lines of .xls it runs just once then stop. Weird
  22. I tried it too... no sucess... If it is not asking too much but already asking, just try running the files I posted ... Pasta1.xls WATER.au3
  23. The script is doing what I want, however what happens ... I have an excel file with e.g 200 lines that serves as a database to put the information in IE ...However I do not know how to do to the script go to the second line excel at the end of the script I put him to delete the first line, so I can rotate in all remaining lines. It was here enters the Loop, can not I do.
  24. Hello all. You are master in autoit maybe can tell me easily... Whats wrong with my Loop ? HotKeySet("{ESC}", "Terminate") #include <Excel.au3> #include <IE.au3> Global $sExcelFile = "C:\Users\e8760255\Desktop\Pasta1.xls" ; <== Add the name of the Excel file here and your User Global $oExcel = _ExcelBookOpen($sExcelFile) Global $aExcelData = _ExcelReadSheetToArray($oExcel);$oExcel $oIE = _IECreate() _IENavigate($oIE, "https://webhomolog.fazenda.sp.gov.br/simp"); https://webhomolog.fazenda.sp.gov.br/simp ;=======================>FROM HERE While 1 $o_form = _IEFormGetObjByName($oIE, "form1") $o_txtCpf = _IEFormElementGetObjByName($o_form, "txtCpf") $o_txtNumDoc = _IEFormElementGetObjByName($o_form, "txtNumDoc") $O_btnConsultar = _IEFormElementGetObjByName($o_form, "btnConsultar") For $iRow = 1 To $aExcelData ; Process all read Excel rows _IEFormElementSetValue($o_txtCpf, $aExcelData[$iRow][1]) _IEFormElementSetValue($o_txtNumDoc, $aExcelData[$iRow][2]) Next $O_btnConsultar.click _IELoadWait($oIE) $o_form = _IEFormGetObjByName($oIE, "_ctl0") $o_btnContinuar = _IEFormElementGetObjByName($o_form, "btnContinuar") If IsObj($o_btnContinuar) Then $o_btnContinuar.click _IELoadWait($oIE) EndIf If not isObj($o_btnContinuar) Then $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGare = _IEFormElementGetObjByName($o_form, "btnGare") $o_btnGare.click _IELoadWait($oIE) EndIf $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGare = _IEFormElementGetObjByName($o_form, "btnGare") $o_btnGare.click _IELoadWait($oIE) ; Doc informations $o_form = _IEFormGetObjByName($oIE, "Form1") $o_txtObs = _IEFormElementGetObjByName($o_form, "txtObs") $o_txtDataPagto = _IEFormElementGetObjByName($o_form, "txtDataPagto") $o_txtReceita = _IEFormElementGetObjByName($o_form, "txtReceita") For $iRow = 1 To $aExcelData ; Process all read Excel rows _IEFormElementSetValue($o_txtObs, $aExcelData[$iRow][3]) _IEFormElementSetValue($o_txtDataPagto, $aExcelData[$iRow][4]) _IEFormElementSetValue($o_txtReceita, $aExcelData[$iRow][5]) Next $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnCalculoProd = _IEFormElementGetObjByName($o_form, "btnCalculoProd") $o_btnCalculoProd.click _IELoadWait($oIE) $o_form = _IEFormGetObjByName($oIE, "Form1") $o_btnGera = _IEFormElementGetObjByName($o_form, "btnGera") $o_btnGera.click _IELoadWait($oIE) Sleep (6000) Send("{CTRLDOWN}") Send("{SHIFTDOWN}") Send("s") Send("{CTRLUP}") Send("{SHIFTUP}") Sleep (3000) Send("{ALTDOWN}") Send("s") Send("{ALTUP}") Sleep (1500) Send("!{F4}") Sleep (1500) $o_form = _IEFormGetObjByName($oIE, "_ctl0");Form1 $o_btnSair = _IEFormElementGetObjByName ($o_form, "btnSair") $o_btnSair.click _ExcelRowDelete($oExcel,1) ;=======================>TO HERE WEnd Func Terminate() Exit 0 EndFunc Appreciate your help.
×
×
  • Create New...