Jump to content

walec

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by walec

  1. Hello Using EzMySql UDF I display the contents of the table. $aOk = _EzMySql_GetTable2d("SELECT post_title, max_price, stock_quantity FROM `fdgh57jgh_posts`, `fdgh57jgh_wc_product_meta_lookup` WHERE fdgh57jgh_posts.ID = fdgh57jgh_wc_product_meta_lookup.product_id") $error = @error If Not IsArray($aOk) Then MsgBox(0, $sMySqlStatement & " error", $error) _ArrayDisplay($aOk, "2d Array Names of certain eyecolour") How can you modify the encoding of the displayed Polish characters? (e.g. ł, ń, ą ...)
  2. ; #INDEX# ======================================================================================================================= ; Title .........: OOoCalc ; AutoIt Version : 3.3.7.20++ ; Language ......: Functions that assist in the automation of OpenOffice/LibreOffice Calc ; Author(s) .....: Leagnus, Andy G, GMK, mLipok ; ===============================================================================================================================
  3. Hello How can I export a sheet to pdf using the OOoCalc.au3 UDF? Thank you for any hints or possibly other solutions / functions.
  4. I don't know if it would be against with their TOS or not.
  5. That's right, it tests the script non-stop on the same page. Local $Use_Agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0' local $Link = 'https://allegro.pl/kategoria/ogrod-1532?string=legutko&bmatch=e2101-d3681-c3682-hou-1-4-0319' Local $sStrona = http_get_example($Link, $Use_Agent) ;GUICtrlSetData($myedit, $sStrona) Func http_get_example($Link, $Use_Agent) Local $oHttp = Null, $oComErr = Null ;Register COM Error Handler $oComErr = ObjEvent("AutoIt.Error", com_error_handler) If @error Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", "Unable to register COM error handler - @error = " & @error) ;Create HTTP COM object $oHttp = ObjCreate("winhttp.winhttprequest.5.1") If @error Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", "Unable to create HTTP COM object - @error = " & @error) With $oHttp ;Open GET request .Open("GET", $Link) If @error Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", StringFormat("(0x%X) %s", $oComErr.RetCode, $oComErr.WinDescription)) ;Set request header(s) .SetRequestHeader("User-Agent", $Use_Agent) ;Send request .Send() If @error Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", StringFormat("(0x%X) %s", $oComErr.RetCode, $oComErr.Description)) ;If @error Then ;Send request ;.Send() ;If @error Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", StringFormat("(0x%X) %s", $oComErr.RetCode, $oComErr.Description)) ;GUICtrlSetData($myedit, .ResponseText) ;MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", StringFormat("(0x%X) %s", $oComErr.RetCode, $oComErr.Description)) ;Exit ;EndIf ConsoleWrite(StringFormat("HTTP Status: %s %s", .Status, .StatusText) & @CRLF) ;If http status code not 200 If .Status <> 200 Then Exit MsgBox($MB_ICONERROR + $MB_TOPMOST, "ERROR", StringFormat("HTTP Status Code = %s %s", .Status, .StatusText)) ;Display response ;ConsoleWrite(@CRLF & "HTTP Response:" & @CRLF) ;ConsoleWrite(.ResponseText & @CRLF) Return .ResponseText EndWith EndFunc Func com_error_handler($oError) With $oError ConsoleWrite(@CRLF & "COM ERROR DETECTED!" & @CRLF) ConsoleWrite(" Error ScriptLine....... " & .scriptline & @CRLF) ConsoleWrite(" Error Number........... " & "0x" & Hex(.number) & " (" & .number & ")" & @CRLF) ConsoleWrite(" Error WinDescription... " & StringStripWS(.windescription, $STR_STRIPTRAILING) & @CRLF) ConsoleWrite(" Error Description...... " & StringStripWS(.description , $STR_STRIPTRAILING) & @CRLF) ConsoleWrite(" Error RetCode.......... " & "0x" & Hex(Number(.retcode)) & " (" & Number(.retcode) & ")" & @CRLF) EndWith Return ; Return so @error can be trapped by the calling function EndFunc >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\Adconeurope\Allegro AutoIt\Allegro.au3" HTTP Status: 403 Forbidden >Exit code: 1 Time: 510.5
  6. TheXman, your code has worked for me until today. Now the error below is displayed. HTTP Status: 403 Forbidden I suspect it is related to CAPTCHA. When I entered the site from a browser, I had to confirm that I was not a robot. Despite confirmation, the function still does not work.
  7. TheXman, Works for me. I can read html code and extract the necessary information. Now I have to convert for my own needs and understand the commands. Thank you very much. The topic can be closed.
  8. TheXman, If it worked for you, could you please send this piece of code?
  9. I did not share the script with anyone. Everything worked fine. It wasn't until a few days ago that it suddenly stopped. Everything runs from the same laptop. InetRead is cool because it runs in the background. I don't know of any other similar function running in the background.
  10. I want to reading information about offers in specific categories from the website in order to be able to analyze the sales opportunities of my product.
  11. Below the error values. Inet Error: 13 Extended: 0 >Exit code: 28 Time: 6.32
  12. Hello The function below worked for a long time. Now it doesn't download anything and I don't know where the error is. #include <InetConstants.au3> Local $Link = 'https://allegro.pl/kategoria/nasiona-warzywa-99776?bmatch=e2101-d3681-c3682-hou-1-4-0319' Local $dStrona = InetRead($Link) Local $sStrona = BinaryToString($dStrona, $SB_UTF8) ;GUICtrlSetData($myedit, $sStrona) ConsoleWrite($sStrona) The function was good because it reading data in the background. Thank you for any hints or possibly other solutions / functions that are reading data in the background.
  13. Hey I have problem with Set Value for control slider on webside. Anyone have any idea for a solution? I tried but it doesn't work. Local $Strength = _IEGetObjById($oIE_Strona, "strength_value") Local $oText = _IEFormElementGetObjByName($Strength, "valuee") _IEFormElementSetValue($oText, "6") or _IENavigate ($oIE_Strona, "https://guantanamo.prisonwarsonline.com/gym/") Local $oDiv = $oIE_Strona.Document.GetElementByID("strength_value") Local $oAttribute = $oDiv.getAttribute("valuee") If IsObj ( $oAttribute ) Then $oAttribute.value = "6" EndIf Best Regards
  14. I have a problem with function _OOoCalc_FindInRange. The function results only one score Local $Szukanie_Produktu = _OOoCalc_FindInRange($oCalc, "10804031", -1, -1, -1, -1, "Dostawa") MsgBox(0, "" ,'|'& UBound($Szukanie_Produktu) &'|') If I have more cells with the same value then I have an error : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $avReturn[0][$eString] = $oCell.getString ^ ERROR How to find positions all cells ???
×
×
  • Create New...