Jump to content

Jos

Developers
  • Posts

    34,503
  • Joined

  • Days Won

    318

Jos last won the day on October 9

Jos had the most liked content!

About Jos

Profile Information

  • Member Title
    Je maintiendrai

Recent Profile Visitors

20,863 profile views

Jos's Achievements

  1. @donnyh13, Still feels like some race condition, so I have added some logic that the "IPC ping" needs to fail 3 times now before it is assumed that the other process must have ended. So the watcher task gives the other process(es) running the userscript a bit more time to handle the userscript ending. (I hope) Could you please test with this version of AutoIt3Wrapper.au3 to check if you still can make things fail? Thanks
  2. What about this version?: #include <Date.au3> #include <WinAPIDiag.au3> #include <Curl.au3> Test() Func Test() ;Set up and execute cURL request $hCurl = Curl_Easy_Init() If Not $hCurl Then Return MsgBox($MB_ICONERROR, "Error", "Curl_Easy_Init() failed.") $url = "https://speechgen.io/index.php?r=api/text" ; $Text = "Привіт шановний" $data = 'token=-redacted-' & _ '&email=' & _URIEncode('email@gmail.com') & _ '&voice=Ostap' & _ '&format=mp3' & _ '&speed=0.8' & _ '&emotion=good' & _ '&pause_sentence=300' & _ '&pause_paragraph=400' & _ '&bitrate=48000' & _ '&text=' & _URIEncode($Text) ConsoleWrite("Data: " & $data & @CRLF) $CURLOPT_RETURNTRANSFER = 19913 Curl_Easy_Setopt($hCurl, $CURLOPT_RETURNTRANSFER, 1) ; Curl_Easy_Setopt($hCurl, $CURLOPT_URL, $url) ; Curl_Easy_Setopt($hCurl, $CURLOPT_HEADER, False) ; Curl_Easy_Setopt($hCurl, $CURLOPT_SSL_VERIFYHOST, False) ; Curl_Easy_Setopt($hCurl, $CURLOPT_POST, 1) ; Curl_Easy_Setopt($hCurl, $CURLOPT_POSTFIELDS, $data) ;Get response code and response $iRespCode = Curl_Easy_Perform($hCurl) If $iRespCode <> $CURLE_OK Then Return ConsoleWrite("Status Message: " & Curl_Easy_StrError($iRespCode) & @LF) $sResponse = BinaryToString(Curl_Data_Get($hCurl)) ;Clean up curl environment Curl_Easy_Cleanup($hCurl) Curl_Data_Cleanup($hCurl) ;Display response ConsoleWrite($sResponse & @CRLF) EndFunc ;==>Test Func _URIEncode($sData) ; Prog@ndy Local $aData = StringSplit(BinaryToString(StringToBinary($sData, 4), 1), "") Local $nChar $sData = "" For $i = 1 To $aData[0] ; ConsoleWrite($aData[$i] & @CRLF) $nChar = Asc($aData[$i]) Switch $nChar Case 45, 46, 48 To 57, 65 To 90, 95, 97 To 122, 126 $sData &= $aData[$i] Case 32 $sData &= "+" Case Else $sData &= "%" & Hex($nChar, 2) EndSwitch Next Return $sData EndFunc ;==>_URIEncode I took the Example of a short text voiceover in PHP variant 1 from their WebSite and converted that to Autoit3.
  3. Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Moderation Team
  4. Did you also fix this line?: $data = '{"Token":"{redacted}","email":"email@gmail.com","voice":"Ostap","format":"mp3","speed":"0.8","emotion":"good", _ "pause_sentence":"300","pause_paragraph":"400","bitrate":"48000",' which should be: $data = '{"Token":"{redacted}","email":"email@gmail.com","voice":"Ostap","format":"mp3","speed":"0.8","emotion":"good",' & _ '"pause_sentence":"300","pause_paragraph":"400","bitrate":"48000",' Try something like this and see what that does: #include <Date.au3> #include <WinAPIDiag.au3> #include <Curl\Curl.au3> Test() Func Test() ;Create an array of request headers Local $arrHeaders = Curl_Slist_Append(0, "Accept: application/json") $arrHeaders = Curl_Slist_Append($arrHeaders, "Content-Type: application/json") ;Set up and execute cURL request $hCurl = Curl_Easy_Init() If Not $hCurl Then Return MsgBox($MB_ICONERROR, "Error", "Curl_Easy_Init() failed.") Curl_Easy_Setopt($hCurl, $CURLOPT_URL, "https://speechgen.io/index.php?r=api/text") Curl_Easy_Setopt($hCurl, $CURLOPT_HTTPHEADER, $arrHeaders) Curl_Easy_Setopt($hCurl, $CURLOPT_USERAGENT, "AutoIt/cURL") Curl_Easy_Setopt($hCurl, $CURLOPT_VERBOSE, 1) Curl_Easy_Setopt($hCurl, $CURLOPT_SSL_VERIFYPEER, 0) Curl_Easy_Setopt($hCurl, $CURLOPT_READFUNCTION, Curl_DataReadCallback()) ;Curl_Easy_Setopt($hCurl, $CURLOPT_CUSTOMREQUEST, "PUT") ;Curl_Easy_Setopt($hCurl, $CURLOPT_UPLOAD, 1) $data = '{"Token":"-redacted-","email":"email@gmail.com","voice":"Ostap","format":"mp3","speed":"0.8","emotion":"good",' & _ '"pause_sentence":"300","pause_paragraph":"400","bitrate":"48000",' & _ '"text":"Heo світ"}' ConsoleWrite(@crlf & $data & @crlf & @crlf) Curl_Easy_Setopt($hCurl, $CURLOPT_POSTFIELDS, $data) ;Get response code and response $iRespCode = Curl_Easy_Perform($hCurl) If $iRespCode <> $CURLE_OK Then Return ConsoleWrite("Status Message: " & Curl_Easy_StrError($iRespCode) & @LF) $sResponse = BinaryToString(Curl_Data_Get($hCurl)) ;Clean up curl environment Curl_Easy_Cleanup($hCurl) Curl_Data_Cleanup($hCurl) ;Display response ConsoleWrite($sResponse & @CRLF) EndFunc ;==>Test
  5. Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team
  6. Something like this? StringRegExpReplace($Var007beta, '(?s).*?Wired\s+(.*)\s+released.*$', "$1")
  7. We've seen that c5 memory corruption error before in this thread, which pointed to some "wrong" version of the MSVCP140.DLL. Thanks for you help trying to find the issue. 😀
  8. @water @mLipok did one of you had a chance to check things or gotten it working in x86?
  9. Nah, that's a Merge failure from my site. I move the lot from an SVN to a Github setup to be able to easier merge the new releases into my version, and missed the updated ico file. Should be fixed in the current zips available. Thanks for letting me know.
  10. It opens fine for me: Any AntiVirus program warnings or something else? I am on Windows 11 Home/23H2 You could try to temporarily renaming the SciteUser.properties file and try again to determine whether it is any of your settings causing this.
  11. Just uploaded SciTEx86.zip & SciTEx64.zip which contain the Latest SciTE 5.5.3 versions released 9 October 2024.
  12. ...and why would they? Please read what EXIF stands for and it probably will make sense!
  13. No need to discuss that language here, considering the history.
×
×
  • Create New...